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

[DSEC-936] more zap logging; use google cloud logging #584

Merged
merged 18 commits into from
Oct 31, 2024

Conversation

TomConner
Copy link
Contributor

Add some log messages to zap scanning. Use google.cloud.logging to fix too many logs showing up in GCP logs as errors.

@TomConner TomConner requested a review from sarahgibs October 30, 2024 21:23
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@sarahgibs
Copy link
Contributor

It looks like this PR significantly changes the checks done on a PR and removes the cloud build step. Can you make sure the previous steps are either included or explained as to why they are gone?

@TomConner
Copy link
Contributor Author

Moved static analysis checks to another branch.

Left trivy workflow on a schedule and not on pull_request - it fails if run too frequently. Will fix soon.

Left deploy workflows disabled - it deploys only docs and was failing. Will fix soon.

@TomConner TomConner requested a review from sarahgibs October 31, 2024 15:39
zap/src/zap.py Outdated Show resolved Hide resolved
zap/src/zap.py Outdated Show resolved Hide resolved
Copy link

Copy link
Contributor Author

@TomConner TomConner left a comment

Choose a reason for hiding this comment

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

Abort the scan on failure to obtain a GCP token.

I considered causing the scan to abort when calls to set up authentication failed including accepting TOS or setting the cookie. Maybe these should cause scans to abort too, but generating zap sessions after the failure might help diagnose that failure or prove it didn't actually fail.

zap/src/zap.py Outdated Show resolved Hide resolved
zap/src/zap.py Show resolved Hide resolved
zap/src/zap.py Show resolved Hide resolved
zap/src/zap.py Show resolved Hide resolved
zap/src/scan.py Show resolved Hide resolved
Copy link
Contributor

@sarahgibs sarahgibs left a comment

Choose a reason for hiding this comment

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

looks good. Let's keep any changes to scan behavior to another PR. Thanks!

@TomConner TomConner merged commit dfbaf52 into master Oct 31, 2024
9 of 11 checks passed
@TomConner TomConner deleted the tc-zap-auth-logging branch October 31, 2024 18:54
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