-
Notifications
You must be signed in to change notification settings - Fork 0
faq
Your API token is invalid or expired.
- Verify with:
purplemet-cli auth check - Create a new token: cloud.purplemet.com/#/tokens/create
- Check the env var is set:
echo $PURPLEMET_API_TOKEN
Same as above. The token is not recognized by the API.
The API rejected the request for the current token. The CLI surfaces the raw API response after the api http 403: prefix. The most common case is an admin-only command (users, sessions, tokens) run with an OPERATOR or READER token, which returns:
api http 403: {"code":"API_METHOD_NOT_ALLOWED","error":"Access to this method is not allowed to entity"}
Use an ADMIN token for those commands, or check the token's permissions in the Purplemet dashboard.
No token was configured. Set it via one of:
# Environment variable (recommended)
export PURPLEMET_API_TOKEN=your-token
# CLI flag
purplemet-cli analyze https://app.com --token your-token
# .env file in current directory
echo "PURPLEMET_API_TOKEN=your-token" > .env- Check your internet connection
- Verify
PURPLEMET_BASE_URLis correct - If behind a proxy, set
HTTP_PROXY/HTTPS_PROXY
Rate limit reached. The CLI automatically retries with Retry-After. If persistent:
- Reduce analysis frequency
- Contact Purplemet support for limit increase
- Increase
--wait-timeout(default: unlimited) - Increase
--timeoutfor slow networks (default: 30s) - Check that the target URL is publicly reachable
The CLI could not verify the TLS certificate of the Purplemet API endpoint it connects to (--base-url / PURPLEMET_BASE_URL) — e.g. a self-signed certificate, an internal API gateway, or a missing CA in the local trust store. This concerns the CLI-to-API connection only: the scanned target URL is fetched server-side by the Purplemet platform, so --insecure has no effect on any target-site certificate.
- For development against such an endpoint: add
--insecure(skips TLS verification of the API connection only — vulnerable to MITM, dev only) - For production: ensure the proper CA certificates are installed in the system trust store
The analysis failed on the Purplemet platform. Check the detailed error in the Purplemet dashboard for the specific cause (typically the target URL was unreachable, returned an unexpected response, or was blocked).
Expected behavior when --fail-on-severity (or any other --fail-on-* flag) is set
and the analysis violates the gate. The CLI prints one FAILED line per failing
gate to stderr, then a N/M gate(s) failed summary, and exits with code 1.
Common gate messages emitted by the CLI:
severity gate: 1 critical, 2 high (threshold: high)rating gate: D (threshold: C)CVSS gate: 9.8 >= 9.0 (CVE-2024-...)EOL gate: 2 end-of-life component(s) (jQuery 2.1.4, PHP 7.4)KEV gate: 3 CISA Known Exploited Vulnerability(ies) detectedEPSS gate: 0.85 >= 0.75 (CVE-2024-...)WAF gate: no WAF detectedcert expiry gate: 1 certificate(s) expiring within 30 days (...)
Options to react:
- Fix the vulnerabilities
- Adjust the threshold (e.g.
--fail-on-severity criticalis less strict) - Remove the flag to disable the gate
- Acknowledge the risk with
purplemet-cli issues ignore(ignored issues are always excluded from gate evaluation)
You used --no-create but the URL doesn't match any existing site. Either:
- Remove
--no-createto auto-create - Use the site UUID instead of URL:
purplemet-cli sites listto find it
The argument to analyze must be either:
- A valid URL starting with
http://orhttps:// - A valid UUID (e.g.
a1b2c3d4-e5f6-7890-abcd-ef1234567890)
If polling reaches --wait-timeout before the analysis completes, the CLI exits with code 3. Raise the timeout for large sites:
purplemet-cli analyze <url> --wait-timeout 600000 # 10 minutesRefer to the Purplemet documentation for details on how analyses run.
purplemet-cli analyze https://app.com --json
# or
purplemet-cli analyze https://app.com --format json# Any format
purplemet-cli analyze https://app.com --format json --output-file report.json
purplemet-cli analyze https://app.com --format html --output-file report.html
purplemet-cli analyze https://app.com --format sarif --output-file results.sarifpurplemet-cli analyze https://app.com --format sarif --output-file results.sarifSARIF 2.1.0 output is compatible with GitHub Code Scanning, Azure DevOps Advanced Security, and any SARIF-compatible viewer.
Ratings (A–F) are computed and defined by the Purplemet platform. See the official Purplemet documentation for authoritative definitions.
Set the token as a secret/variable in your CI platform:
- GitHub: Settings → Secrets and variables → Actions → New repository secret
- GitLab: Settings → CI/CD → Variables (mark as masked)
- Bitbucket: Repository Settings → Pipelines → Variables (mark as secured)
- Jenkins: Manage Jenkins → Credentials → Add credentials
- Azure DevOps: Pipelines → Library → Variable Groups (mark as secret)
- Set
--wait-timeout 300000(5 min) to bound execution - Check that the target URL is reachable from the internet
Use the appropriate mechanism for your CI platform:
| Platform | Mechanism |
|---|---|
| GitHub Actions | continue-on-error: true |
| GitLab CI/CD |
allow_failure: true or allow_failure: exit_codes: [1]
|
| Bitbucket |
after-script for post-processing |
| Jenkins | Mark build UNSTABLE instead of FAILURE
|
| Azure DevOps | continueOnError: true |
Example (any platform):
purplemet-cli analyze https://app.com --json --fail-on-severity high || trueUse a matrix/parallel strategy in your CI platform, or loop in shell:
for URL in https://app1.com https://app2.com https://app3.com; do
purplemet-cli analyze "$URL" --json --fail-on-severity high || true
doneUse the diff command to compare two analyses:
purplemet-cli diff <analysisId1> <analysisId2> --site-id <siteId>Wrong architecture. Use the correct image for your platform:
-
ppmsupport/purplemet-cli:latestsupportslinux/amd64andlinux/arm64 - Specify platform:
docker run --platform linux/amd64 ...
Add --insecure flag (dev only) or ensure CA certificates are available in the container.
docker run --rm -e PURPLEMET_API_TOKEN=<token> ppmsupport/purplemet-cli:v1.2.0 analyze https://app.comGo to cloud.purplemet.com/#/tokens/create.
Log in to cloud.purplemet.com to view your sites, analyses, and detailed findings in the Purplemet dashboard.
# Daily at 2am
purplemet-cli sites schedule <siteId> --frequency DAILY --time 02:00
# Weekly on Monday at 2am
purplemet-cli sites schedule <siteId> --frequency WEEKLY --day monday --time 02:00Or use your CI/CD platform's scheduling (e.g. GitHub Actions schedule, GitLab schedules).
- Documentation: docs/
- Issues: Contact Purplemet support