How to Create a Custom Benchmark Via API #148
refeed
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is a custom benchmark?
Custom benchmark is a benchmark that can be created by the user. This is different with the predefined benchmarks that comes predefined by the StackGuardian Platform when creating a Connector.
How to create a custom benchmark via API?
For this, we will use the Update Connector API. The user will need the connector to be created beforehand.
Request Body
The request body is a JSON object that contains discovery configuration for custom benchmarks. Below is the schema:
DiscoverySettingsbenchmarksbenchmarks.<benchmark_id>runtimeSource{"sourceConfigDestKind": "GITHUB_COM"}checks["aws_compliance.benchmark.hipaa"]description"Health Insurance Portability..."summaryDesc"The HIPAA Security Rule establishes..."activetruelabel"HIPAA"isCustomChecktrueorfalsesummaryTitle"HIPAA Final Omnibus Security Rule 2013"discoveryInterval0to disable).0isPrivatetrueorfalseauth"/secrets/test_secret"Example Request Body
{ "DiscoverySettings": { "benchmarks": { "82356561-4f28-4fd9-82b8-b43f4c54284f": { "runtimeSource": { "sourceConfigDestKind": "GITHUB_COM", "config": { "repo": "https://github.com/turbot/steampipe-mod-aws-thrifty", "ref": "v0.29", "gitCoreAutoCRLF": false, "isPrivate": true, "auth": "/secrets/test-secret123" } }, "checks": ["all"], "description": "AWS Cost Thrifty benchmark", "summaryDesc": "This benchmark makes sure that all of the resources are operated cost-effectively", "active": true, "label": "custom-thrifty", "isCustomCheck": true, "summaryTitle": "custom-thrifty", "discoveryInterval": 1440 } } } }Beta Was this translation helpful? Give feedback.
All reactions