Skip to content
Discussion options

You must be logged in to vote

Hi @Afsalmc !

To scan Terraform Plan as JSON, you must enable the JSON scanner.

❯ trivy conf plan.json --misconfig-scanners json --namespaces user --config-check deny_deletion.rego -q --table-mode detailed

plan.json (json)

Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 1)

 (CRITICAL): Deletion of resource 'aws_s3_bucket.example' (type: aws_s3_bucket) is not allowed
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Prevents deletion of any resources in a Terraform plan
──────────────────────────────────────────────────────────────────────────…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nikpivkin
Comment options

Answer selected by simar7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
triage/support Indicates an issue that is a support question.
2 participants