Install
$ agentstack add skill-pitimon-claude-governance-governance-check Open-source listing, not yet scanned by AgentStack. Follow the source repository for install instructions.
Security review
⚠ Flagged2 finding(s); flagged for manual review. · v0.1.0 How review works →
- • Prompt-injection patterns
- • Secret / credential exfiltration
- • Dangerous shell & filesystem operations
- • Untrusted network calls
- • Known-malicious package signatures
- high Dangerous shell/eval execution.
- high Destructive filesystem operation.
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ● Dynamic code execution Used
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Governance Fitness Function Check
Run the requested governance check category. Default to all if no argument provided.
Scope and When to Use
This is a QUICK checklist tool — single-category, fast pass/fail, actionable remediation. Use for:
- Pre-commit spot checks on staged changes
- Quick validation before pushing
- Verifying a specific category (secrets, file size, etc.)
For deep multi-file review with severity grading and domain invariant analysis, use the governance-reviewer agent instead.
Consequence classification: If the task involves irreversible operations (production deploy, data migration, credential rotation), classify as In-the-Loop regardless of task type. [DSGAI19]
Project Type Detection
Before running checks, detect the project's primary language:
| Indicator | Language | | ------------------------------------------------ | -------- | | package.json | JS/TS | | pyproject.toml, requirements.txt, setup.py | Python | | go.mod | Go | | Cargo.toml | Rust |
If multiple indicators exist, check all relevant languages. If none match, apply generic checks.
Check Categories
pre-commit
Scan staged/changed files for:
- Hardcoded secrets — Search for patterns:
API_KEY=,password=,sk-,sk-ant-,ghp_,AKIA, hardcoded token strings,-----BEGIN PRIVATE KEY-----, JWT tokens (eyJ...), Google API keys (AIza...), Azure connection strings, MongoDB URIs. PII patterns (email, SSN, credit card) generate warnings [DSGAI01]. Usegit diff --cachedorgit diffto get changed content. - Input validation — New API endpoints/route handlers MUST have input validation. Check for language-appropriate validation:
- JS/TS: Zod, joi, yup, express-validator
- Python: pydantic, marshmallow, cerberus
- Go: go-validator, custom validation functions
- Rust: serde with validation, validator crate
- Parameterized queries — Database queries must use parameterized queries, not string interpolation. Search for SQL string concatenation patterns.
- File size — No file should exceed 800 lines. Use
wc -lon changed files. - Function length — No function should exceed 50 lines. Use Grep to find function definitions and count lines.
- Immutability — Check for direct mutation patterns (
.push(,obj.prop =on shared state,delete obj.prop). - Debug prints — No debug prints in production code (allow in test files):
- JS/TS:
console.log - Python:
print((excluding logging) - Go:
fmt.Println(excluding structured logging) - Rust:
println!
- Dangerous functions — Flag usage of:
- JS/TS:
eval(),innerHTML - Python:
eval(),exec(),pickle.loads() - Go:
unsafe.Pointer - Rust:
unsafeblocks
- Agent credentials — Check for hardcoded OAuth tokens, bearer tokens, refresh tokens, client secrets in code and config files. Patterns:
Bearer,oauth_token=,refresh_token=,client_secret=,Authorization: Bearer. Reference: [DSGAI02]. - AI model artifacts — Flag committed model files (
.onnx,.safetensors,.gguf,.pt,.pkl,.bin>10MB). These should be tracked via Git LFS or external artifact registry, not committed directly. [DSGAI04] - Unsafe deserialization — Flag
torch.load(),pickle.load(),pickle.loads(),yaml.unsafe_load(),joblib.load()without safe alternatives (weights_only=True,safetensors). [DSGAI04] - AI dependency pinning — In requirements.txt/pyproject.toml, flag unpinned AI packages (torch, transformers, openai, anthropic, langchain) using
>=or no version pin. [DSGAI04] - Telemetry hygiene — Flag patterns logging full prompts/contexts in production:
log.*prompt,log.*context,logger.*user_input,console.log.*messages,logging.*completion. Allow in test/debug files. [DSGAI14] - Telemetry redaction — If observability configs exist (OpenTelemetry, Datadog, Sentry), verify PII/prompt scrubbing is configured. [DSGAI14]
pre-pr
Check the full branch diff against base:
- Conventional commits — All commits on this branch must follow format:
type: descriptionwhere type is one of: feat, fix, refactor, docs, test, chore, perf, ci. Usegit log --oneline. - DOMAIN.md — If entity schemas changed (new fields, new entities, changed types), DOMAIN.md must be updated.
- Breaking changes — API contract changes (removed fields, changed types, removed endpoints) must be documented in an ADR.
- Test coverage — Changed files should have corresponding test files. Check for test file existence.
- TODO context — All TODO comments must include context about what needs to be done and why.
architecture
Periodic architecture review:
- Service boundaries — No direct cross-service database access. Services communicate through APIs.
- Error message safety — Error responses must not leak stack traces, internal paths, or sensitive data.
- Authentication — All non-health-check endpoints require authentication.
- Rate limiting — Public endpoints should have rate limiting configured.
- Cache consistency — Cache TTL policies are documented and consistent.
- Plugin/MCP security — If the project uses Claude Code plugins or MCP servers: (a) plugins are from trusted sources, (b) MCP tool permissions follow least-privilege (no
"allowed-tools": ["*"]), (c).mcp.jsoncontains no hardcoded credentials. Check.claude/settings.jsonand MCP configs. Reference: [DSGAI06]. - Context minimization — Verify that session-start hooks stay under ~500 tokens, CLAUDE.md does not contain secrets or PII, and rules files do not embed real credentials as examples. Reference: [DSGAI15].
- Agent credential hygiene — Verify agent
.mdfiles and skill frontmatter contain no embedded credentials or API keys. Reference: [DSGAI02]. - Shadow AI policy — If project has
shadow-ai-policy.md, verify approved AI tooling is documented. Flag references to unsanctioned AI tool endpoints in source code or configs. [DSGAI03] - Irreversible operation safeguards — Scripts/code performing destructive operations (DROP TABLE,
rm -rf, force push, production deploy) must have confirmation gates or dry-run modes. [DSGAI19] - Session isolation — Agent memory/state must be scoped per-project and per-user. Cache keys must include user/project/session scope. Flag global state stores without scope qualifiers. [DSGAI11]
- Multi-tenant data separation — In multi-tenant code, verify tenant ID is included in all database queries, cache keys, and file paths. Flag shared state without tenant scoping. [DSGAI11]
Output Format
Present results as a structured checklist:
## Governance Check: [category]
### Passed
- [x] No hardcoded secrets found
- [x] File sizes within limits
### Failed
- [ ] FAIL: `src/api/handler.ts` — 923 lines (max 800)
- [ ] FAIL: Missing input validation in `POST /api/users`
### Warnings
- [!] `src/utils/helper.ts:45` — TODO without context
### Summary
Passed: X/Y | Failed: Z | Warnings: W
When a check maps to a DSGAI control, include the reference in the output line (e.g., [DSGAI02]). For compliance mapping, see docs/compliance/DSGAI-MAPPING.md [DSGAI08]. Data classification guidance: examples/DATA-CLASSIFICATION.md.example [DSGAI07].
If all checks pass, congratulate the user. If any fail, provide specific file paths, line numbers, and remediation guidance.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: pitimon
- Source: pitimon/claude-governance
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.