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

Support Exception Management Workflow #13

Closed
abhisek opened this issue Feb 9, 2023 · 2 comments
Closed

Support Exception Management Workflow #13

abhisek opened this issue Feb 9, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@abhisek
Copy link
Member

abhisek commented Feb 9, 2023

Requirement

As a security engineer, I want to adopt vet in CI/CD as a security gate to prevent introduction of new packages that violate my policy so that I can prevent increasing security & technical debt while I work on mitigating the existing problem

This basically means we need to provide a way to add the existing findings at the time of adoption into an exception list. The filters can ignore packages in exception list to prevent vet failing in CI for existing packages.

Proposed Workflow

Use vet query command to generate exception list

vet query --from /path/to/json-dump --exception-add --exception-file /path/to/exceptions.yml

Subsequently, when filter query is executed, the packages in exception list should be ignored. vet should also load a default exceptions file if available from:

  1. $PWD/.vet/exceptions.yml
  2. $scanDirectory/.vet/exceptions.yml

CI Integration

The generated exceptions.yml should be pushed to repository in a standard path for autoload such as .vet/exceptions.yml or explicitly passed as param during scan

vet scan -D /path/to/repo --exception-file /path/to/exception.yml --filter '...' --filter-fail
@abhisek abhisek added the enhancement New feature or request label Feb 16, 2023
@abhisek
Copy link
Member Author

abhisek commented Feb 16, 2023

@jchauhan Can you review this and add your suggestion?

@jchauhan-fc
Copy link

Can we just make a small change ?

vet query --generate-exception --from /path/to/json-dump  --exception-out-file /path/to/exceptions.yml
OR 
vet generate-exception  --from /path/to/json-dump  --exception-out-file /path/to/exceptions.yml

we can also suggest it as a step while generating github action or even generate it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants