en un clic
ai-code-review
// Deep code scan for AI security issues — prompt injection, PII in prompts, hardcoded keys, unguarded agents.
// Deep code scan for AI security issues — prompt injection, PII in prompts, hardcoded keys, unguarded agents.
Connect to a GCP project, validate credentials, and discover what services are in use.
Run SOC 2 compliance checks against connected cloud accounts (AWS, Azure, and/or GCP) and display findings.
Run AI governance checks across cloud accounts and code repos — ISO 42001, EU AI Act, NIST AI RMF compliance.
Scan cloud accounts and GitHub repos to discover AI/ML services and build an AI system inventory.
Walk staged changes against the engineering principles checklist and report pass/fail per principle. Run before any non-trivial commit. Catches doc drift, stub functions, single-region defaults, missing framework mappings, and other regressions before they ship.
Generate a public-facing security trust page from scan data. Produces a single deployable index.html that shows compliance framework scores, security policies, infrastructure overview, and data protection posture. Deployable to S3, Vercel, Netlify, or GitHub Pages.
| name | ai-code-review |
| description | Deep code scan for AI security issues — prompt injection, PII in prompts, hardcoded keys, unguarded agents. |
| user-invocable | true |
You are performing a deep AI security review of a code repository for a founder. Focus on practical, actionable findings.
Whitney is a separate open-source tool shipped at
github.com/transilienceai/whitney.
Install it first if it is not already on PATH:
pip install whitney
The whitney CLI does the static detection. This skill wraps it with
plain-English explanations and severity grouping.
Read shasta.config.json for python_cmd. Scan the current directory
or a specified path by calling whitney scan --json.
whitney scan . --json > /tmp/whitney-findings.json
If whitney is not installed, fall back to the module form:
<PYTHON_CMD> -m whitney.cli scan . --json > /tmp/whitney-findings.json
Then parse and group the output:
<PYTHON_CMD> -c "
import json
from collections import defaultdict
data = json.load(open('/tmp/whitney-findings.json'))
by_severity = defaultdict(list)
for f in data:
details = f.get('details', {}) or {}
by_severity[f.get('severity', 'info')].append({
'check_id': f.get('check_id'),
'title': f.get('title'),
'file': details.get('file_path', 'unknown'),
'line': details.get('line_number', '?'),
'cwe': details.get('cwe', []),
'owasp': details.get('owasp', []),
'owasp_agentic': details.get('owasp_agentic', []),
'snippet': details.get('code_snippet', ''),
'remediation': f.get('remediation', ''),
})
print(json.dumps({
'total': len(data),
'critical': len(by_severity.get('critical', [])),
'high': len(by_severity.get('high', [])),
'medium': len(by_severity.get('medium', [])),
'low': len(by_severity.get('low', [])),
'findings': dict(by_severity),
}, indent=2))
"
For each finding:
Group by severity: CRITICAL (fix now) → HIGH (fix this sprint) → MEDIUM (fix this month) → LOW (track)
Whitney emits raw findings with CWE and the two OWASP families baked
in. Regulatory framework enrichment (ISO 42001, EU AI Act, NIST AI RMF,
MITRE ATLAS) is Shasta's job — the /ai-scan skill adds those tags as
a post-processing step via shasta.compliance.ai.mapper.