Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions magefiles/config_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const configSchemaPath = "schema/trivy-config.json"
func generateConfigSchema(outputPath string, allFlagGroups []flag.FlagGroup) error {
root := &jsonschema.Schema{
Schema: "https://json-schema.org/draft/2020-12/schema",
ID: "https://www.schemastore.org/trivy-config.json",
Type: schemaTypeObject,
Title: "Trivy Configuration",
Description: "Configuration file for Trivy security scanner (trivy.yaml)",
Expand Down
1 change: 1 addition & 0 deletions schema/trivy-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@
}
}
},
"$id": "https://www.schemastore.org/trivy-config.json",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We generate this file using generateConfigSchema() (in mage package).
You need to update this function.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Because this PR hasn't been merged yet, I think we can wait a bit.
If they don't merge it, we'll change the URL to https://raw.githubusercontent.com/aquasecurity/trivy/main/schema/trivy-config.json.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It's just been merged, should be up on the website later

"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Trivy Configuration",
"description": "Configuration file for Trivy security scanner (trivy.yaml)"
Expand Down