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: Only publish metrics on commit #353

Merged
merged 6 commits into from
Jan 9, 2024

Conversation

tdurk93
Copy link
Contributor

@tdurk93 tdurk93 commented Jan 5, 2024

Instead of only detecting scan vs commit scenarios, I added a CLI param to set when metrics should be published (always, never, or on-fail) and utilized that by setting the git pre-commit hook to secureli scan --publish-results=always.

One other notable change is that I added a models/ directory. I think it would make sense to migrate various pydantic models & enums there in the future.

Testing

  • Added a few unit tests
  • Updated some existing unit tests
  • Manual testing shows correct behavior

This is kind of the whole point of seCureLI
This introduces a command-line param that allows for opt-in to
publishing results to New Relic, but it is enabled by default when
scanning as a pre-commit hook
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title failed to match (chore|style|test|feat|fix|docs): .+

@tdurk93 tdurk93 changed the title Feat: Only publish metrics on commit feat: Only publish metrics on commit Jan 5, 2024
@github-actions github-actions bot dismissed their stale review January 5, 2024 17:30

All good!

@tdurk93 tdurk93 marked this pull request as ready for review January 5, 2024 23:03
@tdurk93 tdurk93 merged commit 2cdd033 into main Jan 9, 2024
7 checks passed
@tdurk93 tdurk93 deleted the feat/secureli-326-only-publish-metrics-on-commit branch January 9, 2024 17:42
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.

2 participants