Policy as code linter
Skill sisodiabhumca/agent-skills/skills/policy-as-code-linter
Vendor-neutral skill for linting simple policy-as-code rules (YAML) for style, safety, and completeness.From its SKILL.md
npx -y skills add sisodiabhumca/agent-skills --skill policy-as-code-linterAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.4 KB, 306 tokens by cl100k_base, as published. Nobody here has run it
When to invoke
- Your org stores lightweight access/control policies as code (e.g., allow/deny rules).
- You want a quick lint pass to catch missing fields, invalid enums, overly-broad principals, or risky wildcards.
- You need vendor-neutral checks before deploying to any policy engine.
Inputs needed
- Path to a YAML policy file containing a list of rules.
- (Optional) Output path for a JSON report.
Workflow
- Load YAML and validate top-level shape (list of rules).
- For each rule, validate required fields:
id,effect(allow|deny),actions(list),resources(list)
- Run safety checks:
- flag wildcard principals (
*,all,everyone) - flag wildcard actions/resources (
*) especially in allow rules - detect duplicate rule IDs
- flag wildcard principals (
- Run style checks:
- enforce kebab-case IDs
- recommend
descriptionfield
- Emit findings with severity levels.
Output format
- JSON report:
errors: blocking issueswarnings: risky patternsinfo: non-blocking recommendationssummary: counts
- Human-readable table to stdout.
Guardrails
- Do not claim policy correctness for any specific cloud/IAM provider.
- Treat output as guidance; human review required for security-sensitive decisions.
Reference code
policy_as_code_linter.py
What ships with it: 3 files
6.4 KB alongside SKILL.md, 1 of them executable
- policy_as_code_linter.pyruns6.1 KB
- README.md296 B
- requirements.txt7 B