debricked / cli

Debricked's command line interface. It brings open source security, compliance and health to your project via the command prompt.
MIT License
19 stars 8 forks source link

Add option to use comma seperated env var for default exclusion #134

Closed ProgHaj closed 8 months ago

ProgHaj commented 8 months ago

Add option for exclusions-env-var (will only check os.Getenv, so if ran locally need to supply the command with the env variable).

The priority which will be checked is:

  1. Exclusion flags (-e "excl1" -e "excl2")
  2. Environment variable, os.Gegenv("DEBRICKED_EXCLUSIONS" where DEBRICKED_EXCLUSIONS is a commaseparated list (DEBRICKED_EXCLUSIONS="excl1,excl2")
  3. Default parameters { filepath.Join("**", "node_modules", "**"), filepath.Join("**", "vendor", "**"), filepath.Join("**", ".git", "**"), filepath.Join("**", "obj", "**"), }

When exclusions are found, rest of the priorities won't be checked.

Fixes #122

github-actions[bot] commented 8 months ago

CodeScene PR Check


View detailed results in CodeScene

Code Health Quality Gates ✅ OK
Recommended Review Level Lightweight sanity check
Declining Code Health 0 findings(s) 🚩
Improving Code Health 0 findings(s) ✅
Affected Hotspots 0 files(s) 🔥