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

security-command-center: no code samples for managing security marks on assets #9593

Open
hegemonic opened this issue Oct 18, 2024 · 2 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@hegemonic
Copy link
Contributor

In which file did you encounter the issue?

https://github.com/GoogleCloudPlatform/java-docs-samples/tree/dd24a493/security-command-center/snippets/src/main/java/vtwo/marks

Did you change the file? If so, how?

no

Describe the issue

There are no code samples that show how to use Security Command Center v2 to manage security marks for assets. We only have code samples for security marks on findings.

We need v2 equivalents of several v1 snippets from this file: https://github.com/googleapis/google-cloud-java/blob/cff95fd0631777a9a8f077848c39d458c7e5b339/google-cloud-examples/src/main/java/com/google/cloud/examples/securitycenter/snippets/SecurityMarkSnippets.java

Specifically, we need v2 equivalents of the samples with the following region tags:

  • securitycenter_add_security_marks
  • securitycenter_delete_security_marks
  • securitycenter_add_delete_security_marks

cc: @owenhuyn

@hegemonic hegemonic added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. triage me I really want to be triaged. labels Oct 18, 2024
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Oct 18, 2024
@owenhuyn
Copy link
Contributor

Asset APIs are not carried over to the V2 API as they are deprecated. Hence security marks are only for findings in the V2 API. This is by design and we don't need V2 equivalents of asset samples that are currently in V1.

@hegemonic
Copy link
Contributor Author

I discussed this offline with @owenhuyn, and he agreed that security marks for assets are supported in the v2 API. Other methods related to assets are not supported in v2.

For example, see the organizations.assets.updateSecurityMarks method in the SCC v2 API.

@grayside grayside removed their assignment Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants