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

feat: include and exclude rules #113

Merged

Conversation

baruchiro
Copy link
Contributor

@baruchiro baruchiro commented Jun 27, 2023

  • fix: don't try to scan util commands
  • feat: print all rules with their tags
  • ci: check needed go mod tidy
  • chore: find duplicate rules
  • feat: include and exclude rules

Closes #28

Examples:

> 2ms rules
Name                              Description                                 Tags
----                              ----                                        ----
adafruit-api-key                  Adafruit API Key                            api-key
adobe-client-id                   Adobe Client ID (OAuth Web)                 client-id
adobe-client-secret               Adobe Client Secret                         client-secret
age secret key                    Age secret key                              secret-key
airtable-api-key                  Airtable API Key                            api-key
algolia-api-key                   Algolia API Key                             api-key
.
.
.
> 2ms discord --exclude-rule foo --include-rule foo
09:38:20 FTL cannot use both include and exclude flags
exit status 1
> 2ms discord
Summary:
totalitemsscanned: 7
totalsecretsfound: 6
> 2ms discord --include-rule access-token
Summary:
totalitemsscanned: 7
totalsecretsfound: 5
> 2ms discord --exclude-rule access-token
totalitemsscanned: 7
totalsecretsfound: 2

@baruchiro baruchiro requested review from jossef and kaplanlior June 27, 2023 15:59
@github-actions
Copy link

github-actions bot commented Jun 27, 2023

kics-logo

KICS version: v1.7.0

Category Results
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 1
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 1
Metric Values
Files scanned placeholder 1
Files parsed placeholder 1
Files failed to scan placeholder 0
Total executed queries placeholder 49
Queries failed to execute placeholder 0
Execution time placeholder 1

secrets/secrets.go Fixed Show fixed Hide fixed
@jossef jossef merged commit 7953f50 into master Jun 28, 2023
@jossef jossef deleted the baruchiro/add-cli-args-to-support-rules-listing-include-exclude branch June 28, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add cli args to support rules listing, include, exclude
2 participants