{"id":114369,"plugin_id":"plugin_asdk_app_6af97352a63c8191a6f3eec1e7372667","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-25T00:22:07.644Z","digest":"e61c1bb911b4d89a1c7851b7eccb5b827f334a9e86d8fc39656b842e81235b94","against":null,"payload":{"description":"Use 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\"). In ChatGPT use the Apiiro MCP workflows; local CLI workflows require a terminal and user authorization.","included_files":[],"name":"guardian-scan","skill_md_contents":"---\nname: guardian-scan\ndescription: \"Use 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\\\"). In ChatGPT use the Apiiro MCP workflows; local CLI workflows require a terminal and user authorization.\"\n---\n\n# Apiiro Scan\n\n## With the Apiiro MCP tools (ChatGPT and Codex)\n\nRules for every Apiiro action:\n- Use the declared MCP tools and their current schemas. Do not invent tool names or arguments.\n- Never change risks in bulk (accept, dismiss, override or reclassify many at once). Each risk needs its own decision.\n- Before a change, scan or Autofix job, name the exact target and get the user's confirmation; an explicit request naming that action and target supplies that authorization.\n- Keep credentials in the host's sign-in flow. Never read credential files, print tokens, or ask for secrets in chat.\n- Report actual tool results and errors. Do not claim a mutation, scan or fix succeeded before its result confirms it.\n\n- A user-authorized changed-file scan uses `apiiro_scans_trigger(operation='quick')`, the configured `repository_git_url`, and `files` containing `file_path`, `baseline_content` and `candidate_content`. Supply scan options only as declared by the current schema. Report returned new/resolved findings.\n- A diff scan uses `apiiro_scans_trigger(operation='diff')` with `repository_url`, `baseline_commitish`, `candidate_commitish` and the declared ref types. Read its returned identifier with `apiiro_scans(operation='result')`; `scan_type` must match the result's scan family.\n- Do not start a scan when the user only asked to list existing risks. Do not fabricate local file contents, refs or scan results.\n\n## With the Apiiro CLI (Codex only, optional)\n\nUse these current upstream CLI workflows only in a host with a terminal, when the user requests CLI functionality or no MCP tool supports the task. In ChatGPT explain that CLI-only workflows require a terminal; do not invent matching MCP tools. CLI authentication must go through `apiiro login`; never read credential files or print saved tokens. Do not request secrets in chat or place tokens in command arguments. Follow the upstream safeguards for terminal-only writes. For installation commands, explain them and let the user run them; do not download and execute installers automatically.\n\n### Apiiro Scan\n\nSecurity scanning via the Apiiro CLI: quick file scans, diff scans, pull-request scans and build scans. Use `apiiro scans <id>` to read existing results. The old `diff-scan` and `fast-scan` names still work for existing integrations.\n\n#### Quick Scans\n\n```bash\napiiro scans trigger --type quick --scanners secrets --yes\napiiro scans trigger --type quick src/config.ts --scanners secrets --yes\napiiro scans trigger --type quick --scanners oss package.json bun.lock --yes\napiiro scans trigger --type quick --staged --scanners secrets,oss --yes\napiiro scans trigger --type quick --yes             # All four scanners\napiiro scans --config                              # Quick-scan configuration\n```\n\nScanners: `secrets,oss,ai-sast,iac` (default: all four). Choose one scanner, or include both `secrets` and `oss` with optional `ai-sast` and `iac`. AI SAST can take minutes. Files default to git-changed files; `--staged` reads staged files. Requires a git repository with a remote. Eligibility is checked before uploading file contents. Unmonitored repositories are skipped unless Apiiro allows them for the environment. Skipped scans print a reason.\n\nTriggers ask for confirmation every time. Ask the user before running a write, then pass `--yes` for the agreed command. Quick scans reuse fast-scan output and server verdicts: 0 = clean or could not run, 1 = findings, a server `Block`, or a usage error. A server `Warn` or `Success` allows the scan even with findings. The new commands require sign-in (exit 2 if missing).\n\n`fast-scan` remains available without warnings or confirmation, including `secrets`, `oss`, `all`, `ai-sast`, `iac`, and `config`. Installed hooks and IDE integrations keep using it. Its `--full`, `--fail-on`, `--commit`, and `--base-commit` behavior is unchanged; signed-out scans still skip with exit 0. `fast-scan config` requires sign-in. Pattern scans use a 2-second budget (max 5 via `--timeout`); individual AI SAST and IaC scans use their existing longer budgets.\n\n##### Commit Scanning\n\nCommits made by a coding agent are scanned by the Apiiro prevention hooks (`apiiro init`, or `apiiro hooks <agent> install`). The git `pre-commit` hook that earlier versions installed is retired: `apiiro hooks update` and `apiiro uninstall` remove it and restore any hook it ran in front of. To scan staged files from a git hook of your own, run `apiiro fast-scan all --staged`; it exits 0 when the scan cannot run, so the commit goes through.\n\n#### Diff, Pull-request and Build Scans\n\n```bash\napiiro scans trigger -b main -c feature-branch -r https://github.com/org/repo --wait --yes\napiiro scans trigger -b main -c feature-branch --wait-external --wait --yes\napiiro scans trigger -b <base-sha> -c <candidate-sha> --baseline-type Commit --candidate-type Commit --wait --yes\napiiro scans trigger --type pr --pr 42 -r https://github.com/org/repo --wait --yes\napiiro scans trigger --type build --commit <40-character-sha> --branch main --directory src --yes\napiiro scans trigger --type pr --finish-upload <id> --yes\napiiro scans <id>                                  # Diff results\napiiro scans <id> --type pr --wait\napiiro scans <id> --type build\n```\n\nDefault trigger type: `diff`. Repository URLs auto-detect from git. Diff triggers keep `-i` for interactive reference selection. `--wait-external` and `--finish-upload` support diff and pull-request scans. Build triggers reject `--wait-external`. `--legacy` reads V1 diff or pull-request results. Build results use V2. Build scan commits require 40 hexadecimal characters; uppercase letters are accepted and sent lowercase.\n\nExit codes: 0 = success/warn or passing build, 1 = blocked/failed/error, 2 = not signed in or results still pending without `--wait`. `--wait` polls for results; `--timeout <seconds>` bounds the wait (default: 300). A timeout exits 1 and prints the scan ID for a later read. The hidden `diff-scan` alias accepts its original flags and runs without confirmation.\n\n#### Pull Requests and CI/CD\n\n```bash\napiiro pull-requests --repo <scmRepositoryKey> --status Blocked Pending -o json\napiiro pull-requests --stats --workflow <key> --look-back-days 30\napiiro cicd create --build --commit <40-lowercase-hex-sha> --repo <repositoryKey> --yes\napiiro cicd create --deployment --deployment-id 42 --name production --commit <sha1> <sha2> --repo-version payments=1.2 --yes\n```\n\nPull-request filters: `--repo`, `--status` (`Blocked|Unblocked|Pending|TimedOut`, several allowed), `--workflow`, exact `--server-url`, `--look-back-days` (0–365), ISO `--since`/`--until` (narrow the look-back window). Offset paging defaults to `--page-size 100` (max 1000), `--max-pages 5`; capped results print a note and JSON includes `truncated`.\n\nCI/CD create needs exactly one of `--build` or `--deployment` and asks for confirmation. Builds require one lowercase hexadecimal commit and a repository key; optional flags: `--version`, `--application`, `--build-id`, `--build-url`. Deployments require `--deployment-id` and at least one `--commit` or `--repo-version repo=version`; optional: `--name`, `--url`, multiple `--commit` values. Success prints a message, or `{}` with `-o json`.\n\n#### Managed Semgrep\n\n```bash\napiiro semgrep -o json\napiiro semgrep update --git https://github.com/org/rules --yes\napiiro semgrep update --git <url> --provider-repo <key> --yes\napiiro semgrep update --tar rules.tar --yes\n```\n\nChoose exactly one of `--git` or `--tar`; `--provider-repo` requires `--git`; updates ask for confirmation and print the server's string message. Archive uploads stream from disk with a 600-second timeout unless `--timeout` overrides it. Configuration can be unavailable when AI SAST scan effort manages the rules.\n\n#### Global Options\n\n`-o, --output <json|text>`, `-f, --file <path>`, `--no-color`.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}