pixee-scan
List, view, analyze, create, and delete Pixee scans with filters for repository, branch, detector tool, and analysis state.
pixee · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add pixee/pixee-cli --skill pixee-scan技能说明
name: pixee-scan description: "List, view, analyze, create, and delete Pixee scans with filters for repository, branch, detector tool, and analysis state." license: Apache-2.0 compatibility: Requires the pixee CLI binary on PATH metadata: version: 1.0.0 openclaw: category: "developer-tools" requires: bins: - pixee cliHelp: "pixee scan --help"
pixee scan
PREREQUISITES: Read
../pixee-shared/SKILL.mdfor global flags, exit codes, and error handling,../pixee-auth/SKILL.mdif authentication needs to be configured, and../pixee-repo/SKILL.mdfor the--reporesolution protocol. See../pixee-analysis/SKILL.mdfor the analysis UUIDpixee scan analyzereturns, and../pixee-integration/SKILL.mdfor the--integration-iddiscovery flow used bycreate.
pixee scan manages scans imported into the Pixee platform: list, view, kick off an analysis,
upload a new scan, and delete. A scan is the raw output of one detector tool (sonar, appscan,
dependabot, datadog_sast, semgrep, codeql, etc.) imported on a specific branch and
commit; analyses, findings, and downstream patches all attach back to a scan. Most production
scans land via the platform's CI integrations; pixee scan create is the manual import path for
bulk-loading historical scans, smoke-testing detector formats, or one-shot uploads. Scans expire
roughly seven days after import, and fetching an expired UUID returns a not-found error.
pixee scan list
pixee scan list [filter flags...]
All flags are optional. With none, every scan visible to the token is returned. Pagination is
transparent: the CLI walks every page in one call. There is no --paginate flag here;
--paginate only lives on pixee api.
Text output is tab-separated with columns id, detector, branch, sha, imported_at. The
branch column is empty for detectors that import scans without a branch context (e.g.,
appscan); JSON output omits the branch field entirely in that case rather than emitting an
empty string.
Filter flags:
--repo <name-or-uuid>— repeatable. Restrict to one or more repositories. Names resolve via the protocol documented inpixee-repo. Multiple--repoflags OR together; a scan is returned if it matches any of them.--branch <name>— exact branch name (case-sensitive). Works with or without--repo.--tool <name>— repeatable. Filter by detector. Multiple--toolflags OR together.--analysis-state <state>— one ofcompleted,in-progress,not-analyzed. Filters by the state of the scan's downstream analysis pipeline, not the scan import itself.--has-analysis <true|false>— narrow to scans that have at least one analysis associated (true) or none (false).
--analysis-state not-analyzed and --has-analysis false overlap but are not interchangeable:
--has-analysis filters on existence, while --analysis-state filters on pipeline state. Pick
whichever matches the question being asked.
pixee scan view
pixee scan view <scan-id>
Fetch a single scan by UUID. <scan-id> is the value shown in the first column of
pixee scan list.
Default text mode prints a sectioned Key: value block of the scan's headline fields —
Id, Detector, Branch, Sha, Imported at, Expires at — colon-separated, one field per
line. The Branch line is omitted for detectors that import scans without a branch context
(e.g., appscan) rather than emitting an empty value. Use --output json (or --json) for the
full HAL representation: _links to the scan's analyses, findings, repository, and
scale, plus the body fields id, detector, sha, imported_at, branch (omitted when
blank), and expires_at. A non-existent or expired UUID returns the standard not-found error
and exits 3.
pixee scan analyze
pixee scan analyze <scan-id> [--finding <finding-id>...] [--watch] [--interval <seconds>]
Start an analysis on a scan. On success the CLI prints Started analysis <analysis-id> on scan <scan-id> and exits 0. The analysis runs asynchronously on the server — capture the UUID from
stdout and hand it to pixee analysis view --watch (see pixee-analysis) to poll until terminal
state.
Flags:
--finding <finding-id>— repeatable. Scope the analysis to one or more specific findings. When omitted, every finding in the scan is analyzed (the common case after an import).--watch— after starting the analysis, poll until it reaches a terminal state. Equivalent to chaining the start call intopixee analysis view --watchon the returned UUID; reach for it when the agent's next step depends on completion.--interval <seconds>— polling cadence with--watch(default 5). Has no effect without--watch.
A scan that's not analyzable (e.g., already deleted, or a scan kind the server cannot run
analyses on) returns a 422-shaped problem document and exits non-zero — pixee-shared documents
the rendering.
pixee scan create
pixee scan create <repository> --tool <tool> [--file <path>...] [scan metadata flags...]
Upload a scan to a repository. <repository> is name-or-UUID resolved via the protocol in
pixee-repo. On success the CLI prints Created scan <scan-id> and exits 0; the upload is
multipart, so each --file is attached to the same POST.
Not idempotent. The platform creates a new scan on every successful POST. If a call fails
after the upload may have reached the server (timeout, dropped connection), run
pixee scan list --repo <id> to check for a freshly-imported scan before retrying.
Flags:
--tool <tool>— required. Scanner tool that produced the scan. One ofcodeql,sonar,semgrep,polaris_sast,polaris_sca,appscan,defectdojo,datadog_sast,dependabot,contrast,gitlab_sast,gitlab_dependency_scanning,snyk,checkmarx,veracode,fortify,arnica_sast. The CLI validates against the enum