Skip to content
Back to skills

Guardian Fix

ASecurity

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 and Guardian AI fixes. To list risks: guardian-risks.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 11, 2026
securitygobashgitapisecurity

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add apiiro/marketplace --skill guardian-fix --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Guardian Fix?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Guardian Fix
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/apiiro-guardian-fix/badge)](https://www.skillsdirectory.com/skills/apiiro-guardian-fix)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: guardian-fix
description: "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 and Guardian AI fixes. To list risks: guardian-risks."
---

# Apiiro Fix

Remediate security risks via the Apiiro CLI.

## Recommended: one-shot fix

`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.

```bash
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:

```json
{ "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.

### Passing risk context (automation / IDE integrations)

`--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.

```bash
apiiro risks fix <risk-id> --repository-key <key> --context /tmp/risk-context.json -o json
```

## Manual two-step (equivalent, for control)

If you want to run the steps yourself:

1. `apiiro risks remediate <risk-id>` — curated remediation. If `is_prompt: true`, apply `content`. If `is_prompt: false`, go to step 2.
2. `apiiro guardian query "how do I remediate risk <risk-id>?" --timeout 120` — Guardian fallback.

## Options

`-o, --output <json|text>`, `-f, --file <path>`, `--repository-key <key>` (fix only), `--context <path>` (fix only), `--no-color`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.