tf-best-practices

Pass

Audited by Gen Agent Trust Hub on Nov 15, 2026

Risk Level: SAFECOMMAND_EXECUTIONDYNAMIC_EXECUTION
Full Analysis
  • [Command Execution]: The script validate-migration-artifacts.py uses subprocess.run to invoke bash -n for syntax validation of generated migration scripts. This is a limited and functional use of the shell to ensure the validity of output artifacts.
  • [Dynamic Module Loading]: The validation scripts use importlib.util to dynamically load other Python files from the skill's own scripts/ directory. This is used to share core logic, such as the HCL lexer, across different validation utilities within the skill.
  • [Robust Static Analysis]: The skill includes a custom HCL lexer in validate-terraform-policy.py designed to prevent security policy bypasses. It correctly handles comments, nested blocks, and string interpolations to ensure that security attributes cannot be hidden from the checker.
  • [Read-Only Design]: The skill is explicitly designed to be a 'verdict producer' and does not mutate any files, minimizing the risk of accidental or malicious modification of the user's infrastructure code.
Audit Metadata
Risk Level
SAFE
Analyzed
Nov 15, 2026, 09:55 PM