-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add repo config 'exposures' to support JAS #133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PLease add defaults for bools.
docs/resources/repository_config.md
Outdated
Optional: | ||
|
||
- `applications` (Boolean) Detect whether common OSS libraries and services are used securely by the application. | ||
- `iac` (Boolean) Scans IaC files stored in Artifactory for early detection of cloud and infrastructure misconfigurations to prevent attacks and data leak. Only support by Terraform Backend package type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
support
-> supported
} | ||
|
||
type ScannersCategory struct { | ||
MaliciousCode bool `json:"malicious_code_scan,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better not to use omitempty
with bools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't as the API errors out if the not-applicable fields are present. The API will only accept the valid fields for the repo type. The 'better' way will be to use map[string]bool
struct and dynamically add only the valid fields (vs using omitempty
). This will mean we need to fetch the repo details from RT first to determine its type, then set the fields according to that.
Optional: true, | ||
Description: "Scans IaC files stored in Artifactory for early detection of cloud and infrastructure misconfigurations to prevent attacks and data leak. Only support by Terraform Backend package type.", | ||
}, | ||
"applications": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have defaults for all booleans here? And remove omitempty
in the struct?
And fills in the fields based on package type (and Xray version) Apply the same logic to vulnerability contextual analysis.
No description provided.