feat(scc): add samples for SCC v2 findings
Related to b/339692150 https://cloud.google.com/security-command-center/docs/reference/rest/v2/organizations.sources.locations.findings
Fixes #<ISSUE-NUMBER>
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
- [ ] I have followed Sample Guidelines from AUTHORING_GUIDE.MD
- [ ] README is updated to include all relevant information
- [ ] Tests pass:
nox -s py-3.9(see Test Environment Setup) - [ ] Lint pass:
nox -s lint(see Test Environment Setup) - [ ] These samples need a new API enabled in testing projects to pass (let us know which ones)
- [ ] These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
- [ ] This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
- [ ] This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
- [ ] Please merge this PR for me once it is approved
Here is the summary of changes.
You are about to add 8 region tags.
- securitycenter/snippets_v2/snippets_findings_v2.py:21, tag
securitycenter_list_all_findings_v2 - securitycenter/snippets_v2/snippets_findings_v2.py:58, tag
securitycenter_list_filtered_findings_v2 - securitycenter/snippets_v2/snippets_findings_v2.py:93, tag
securitycenter_group_all_findings_v2 - securitycenter/snippets_v2/snippets_findings_v2.py:123, tag
securitycenter_group_filtered_findings_v2 - securitycenter/snippets_v2/snippets_findings_v2.py:156, tag
securitycenter_list_findings_with_security_marks_v2 - securitycenter/snippets_v2/snippets_findings_v2.py:191, tag
securitycenter_group_findings_by_state_v2 - securitycenter/snippets_v2/snippets_findings_v2.py:220, tag
securitycenter_create_finding_v2 - securitycenter/snippets_v2/snippets_findings_v2.py:262, tag
securitycenter_update_finding_source_properties_v2
This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:
- [ ] Refresh this comment
@thokalavinod
The samples differ from the Java ones here: https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/security-command-center/snippets/src/main/java/vtwo/findings
Kindly reconcile python samples to match with Java.
Hi @m-strzelczyk, Can you help me to run the PR for checking any errors in Kokoro. Thankyou
We don't have GCLOUD_ORGANIZATION defined for the tests - what should it be?
@Sita04 how do you set the SCC_PROJECT_ORG_ID in Java? @thokalavinod maybe we should use the same name as in java?
We don't have
GCLOUD_ORGANIZATIONdefined for the tests - what should it be?@Sita04 how do you set the
SCC_PROJECT_ORG_IDin Java? @thokalavinod maybe we should use the same name as in java?
@m-strzelczyk We fetch the values from this secret: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/.kokoro/tests/run_tests.sh#L84 Kindly help import this secret into this repo.
And yes, @thokalavinod update the env variable names to the same as in Java.
@thokalavinod This PR looks like a duplicate of https://github.com/GoogleCloudPlatform/python-docs-samples/pull/12011 Kindly close this PR.
@RajviM for visbility.
To avoid conflicts between PR's, I am closing this PR. I had used all the files in the below PR link. https://github.com/GoogleCloudPlatform/python-docs-samples/pull/12011