Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-c param (confidence) is now required to get matches. #480

Closed
ismadirolas opened this issue Jul 28, 2022 · 4 comments
Closed

-c param (confidence) is now required to get matches. #480

ismadirolas opened this issue Jul 28, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@ismadirolas
Copy link

Describe the bug
In 1.4.x versions, -c param is optional with default value "medium,high", but we have noticed that in 1.5.x versions is mandatory to get any match (we tested it with custom rules only)

By the way, there is a breaking change between 1.4.x and 1.5.x and now the -c values must be with uppercase (before -c 'low,medium.high', now -c 'Low,Medium,High'), so maybe you should update the wiki, or accept both.

To Reproduce
Steps to reproduce the behavior:

  1. Run ApplicationInspector with ApplicationInspector.CLI analyze -s . -g **/rulesFolder/**,**/.github/actions/**,**/node_modules/**,**/.git/**,**/target/**,*.mock*,*.jpg,*.png,*.gif,*.woff,*.woff2,*.svg,*.ttf,*.jar,*.car,*.war,*.zip,*.a,*.xc*,KakaoOpenSDK,AkamaiBMP,**/dist/** -f json --processing-timeout 600000 --file-timeout 60000 -o result.json -A -u --no-show-progress -r /rulesFolder/ -i -M 20 -> 0 matches
  2. Run ApplicationInspector with ApplicationInspector.CLI analyze -s . -g **/rulesFolder/**,**/.github/actions/**,**/node_modules/**,**/.git/**,**/target/**,*.mock*,*.jpg,*.png,*.gif,*.woff,*.woff2,*.svg,*.ttf,*.jar,*.car,*.war,*.zip,*.a,*.xc*,KakaoOpenSDK,AkamaiBMP,**/dist/** -f json --processing-timeout 600000 --file-timeout 60000 -o result.json -A -u --no-show-progress -r /rulesFolder/ -i -M 20 -c Low,Medium,High -> X matches

Expected behavior
If we don't pass -c param to CLI, get matches of rules with confidence medium and high.

Operating Environment (please complete the following information):

  • Application Inspector Version: 1.5.20
  • OS: Linux Ubuntu 21.10
@ismadirolas ismadirolas added the bug Something isn't working label Jul 28, 2022
gfs added a commit that referenced this issue Jul 28, 2022
Fixes case sensitivity of Enum based arguments
Fixes default Confidence argument not being respected
Fixes severity not being respected
Fixes custom rules not being validated if provided as a directory
Adds new option to skip validation of custom rules
Adds a TextContainer based API for analyze.
gfs added a commit that referenced this issue Jul 28, 2022
@gfs
Copy link
Contributor

gfs commented Jul 28, 2022

@ismadirolas

Thanks for the report.

I have a fix for the case insensitive enums.

I also have a fix for the default behavior - I had missed adding a default value for the commandlineparser.

I believe I've identified one additional potential problem, when custom rules were specified as a folder they were not verified before running, just added to the ruleset.

I hope to merge all these fixes today. #481

This will come as 1.6.2-beta I believe. 1.6 will be in beta for a short time, I'm currently working on some of the lib APIs, but there are no changes currently planned for the CLI.

@ismadirolas
Copy link
Author

Hello @gfs ,

When do you plan to release a 1.6 non-beta version with this issue?

Thanks in advance.

@gfs
Copy link
Contributor

gfs commented Aug 29, 2022

I plan to remove the beta flag this week.

@gfs
Copy link
Contributor

gfs commented Aug 30, 2022

@ismadirolas 1.6.17 (not beta) is now available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants