/apiiro:guardian-fixfrom apiiro
Use when the user wants to fix, remediate, or resolve a security risk or vulnerability ("how do I fix this risk", "remediate this finding"): Apiiro remediation prompts, Guardian AI fixes, and server-side AutoFix jobs. To list risks: guardian-risks.
Ships in apiiro. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Remediate security risks via the Apiiro CLI.
apiiro risks fix <id> does the whole remediation in a single command: it tries
the deterministic, Apiiro-curated remediation first and automatically falls back
to Guardian AI when there isn't one (for example, diff-scan risks). It returns a
single unified result.
apiiro risks fix <risk-id>
apiiro risks fix <risk-id> --repository-key <key> # scope the Guardian fallback explicitly
apiiro risks fix <risk-id> -o json # machine-readable
JSON result shape:
{ "is_prompt": true, "content": "<remediation>", "success": true, "source": "curated" }
{ "is_prompt": true, "content": "<remediation>", "success": true, "source": "guardian" }
source tells you whether the remediation is the deterministic curated one
(curated) or was generated by Guardian (guardian). The repository for the
Guardian fallback is auto-detected from the current git remote unless
--repository-key is given.
Then apply the fix: use the returned content to make the code changes.
--context <path> takes a path to a plain JSON file of the shape
{ "branch": "<branch>", "risk": { ...full risk object... } } — risk is the
complete risk data from the scan result, branch (optional) scopes the
Guardian fallback to the branch where the risk was found. The caller writes
the file (e.g. to a temp directory) and cleans it up after the run; the CLI
only reads it. The risk data is handed to Guardian verbatim, so it
remediates exactly that risk instead of looking it up by id — which is what
lets it fix diff-scan risks, whose ids aren't in the queryable store (an
id lookup alone returns nothing). It's ignored on the curated path, so it's
safe to always pass.
apiiro risks fix <risk-id> --repository-key <key> --context /tmp/risk-context.json -o json
If you want to run the steps yourself:
apiiro risks <risk-id> --remediate — curated remediation. If is_prompt: true, apply content. If is_prompt: false, go to step 2. On error: unknown option '--remediate' (older CLI), use apiiro risks remediate <risk-id>.apiiro ask "how do I remediate risk <risk-id>?" --timeout 120 — Guardian fallback. On unknown command 'ask' (older CLI), use apiiro guardian query with the same arguments.-o, --output <json|text>, -f, --file <path>, --repository-key <key> (fix only), --context <path> (fix only), --no-color.
Use AutoFix to queue fixes on the server and follow their jobs. Ask the user before either write, then pass --yes when running it from an agent; an unattended write without --yes is refused.
apiiro autofix trigger <riskKey...> --yes
apiiro autofix trigger <riskKey...> --dry-run --yes
apiiro autofix
apiiro autofix --risk <riskKey> --status Queued AgentWorking
apiiro autofix --status Completed --status Failed -o json
apiiro autofix <jobId>
apiiro autofix <jobId> --open-pr --yes
Trigger accepts 1-100 distinct risk keys, removes duplicates, and prints jobs and skipped reasons.
If every risk is skipped, the command exits nonzero. --dry-run pushes a branch without opening a pull request; organization simulation settings can also force a dry run.
--open-pr works only on a completed dry-run job with no pull request yet (canOpenPr: true). Opening a pull request is queued. Read the job again to see pullRequest.url, pullRequest.number (a string), and pullRequest.status.
Job details include canOpenPr, job and per-risk failure reasons, per-risk status, summary, and changed files.
List filters: --risk <riskKey> and repeatable, variadic --status <statuses...>.
Allowed statuses: Queued, AssemblingContext, AgentWorking, Completed, Failed, Cancelled.
Lists keep newest-first server order and fetch 5 pages of 20 jobs by default.
Use --page-size (max 100) and --max-pages (-1 for no limit) to fetch more; a warning reports truncation.
Job IDs and --open-pr cannot combine with list filters or paging flags.
All AutoFix modes support -o json|text and -f <path>; list JSON is { items, truncated }; other modes preserve server fields. Put trigger flags after trigger, for example apiiro autofix trigger <riskKey...> --yes -o json.
AutoFix requires read permission for reads and write permission for writes. Trigger can also return a permission error when AI consent is off for the organization.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub apiiro/marketplace --plugin apiiro9 skills in this plugin
/guardian-apiApiiro REST queries across repos or organizations, connectors, audit logs and exports. Policies, coverage, issues and reports have dedicated commands. Applications and application groups: guardian-inventory. Repo risks: guardian-risks./guardian-inventoryApiiro inventory: applications, application groups, teams, artifacts, APIs, dependencies, sensitive data, secrets, validity, technologies, modules, SBOMs, contributors, OSS, licenses, incidents, feed, advisories, repositories, SCM tags, monitoring./guardian-queryUse for freeform security questions about code ("is this code secure?", attack surface, auth flows) or org-wide posture ("top risks across the org", --global), answered by the Apiiro Guardian AI agent. One repo's risks: guardian-risks./guardian-risksUse when the user asks about known security risks or findings in this repo ("what risks does this repo have"), filters Apiiro risks, or wants to accept, ignore, re-level, tag or triage one. Org-wide: guardian-query --global; fixing: guardian-fix./guardian-scanUse to scan code with the Apiiro CLI for secrets, leaked credentials, or vulnerable OSS dependencies, set up pre-commit hooks, or diff-scan branches and PRs for CI gates ("check my code before I push", "scan this PR")./guardian-secure-promptUse when the user is about to implement a coding task and wants Apiiro security requirements added to it ("make this prompt more secure", "what security should I consider"). Full STRIDE report on a design: guardian-threat-model.