Skip to content

Instantly share code, notes, and snippets.

@rpau
Last active May 5, 2022 10:50
Show Gist options
  • Select an option

  • Save rpau/206ff3894475e6b70dd1481bb09ec3ba to your computer and use it in GitHub Desktop.

Select an option

Save rpau/206ff3894475e6b70dd1481bb09ec3ba to your computer and use it in GitHub Desktop.
metadata:
name: "security-team/container-scan"
type: "brick"
golden-paths:
- “backend”
inputs:
image:
type: "string"
default: "${{repository.name}}:${{repository.sha}}"
steps:
- image: "anchore/engine-cli:v.0.9.4"
command: "export ANCHORE_RESULT=$(anchore-cli evaluate check ${{params.image.id}})"
- image: "linux/alpine:3.15.0"
command: "echo $ANCHORE_RESULT | grep -q \"Status:Success\" > ANALYSYS_RESULT"
outputs:
image:
type: "string"
value: "${inputs.image}"
status:
type: "boolean"
value: "${{ANALYSIS_RESULT}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment