Skip to content

Upload Polaris SAST results to Pixee Cloud - #47

Closed
mpiroc wants to merge 5 commits into
mainfrom
pixee-polaris-upload
Closed

mpiroc wants to merge 5 commits into
mainfrom
pixee-polaris-upload

Conversation

@mpiroc

@mpiroc mpiroc commented May 22, 2026

Copy link
Copy Markdown

Summary

Adds a step to the polaris-scan job in .github/workflows/polaris.yaml that runs pixee/blackduck-polaris-scripts after each Polaris scan. The script queries the Polaris REST API for SAST findings, converts them to SARIF, and uploads them to Pixee Cloud (https://edge.getpixee.com), triggering remediation analysis.

The secrets/variables the new step references (PIXEE_API_KEY, POLARIS_ACCESS_TOKEN, POLARIS_PROJECT_ID, POLARIS_PORTFOLIO_ID, PIXEE_REPOSITORY_ID) are already populated in this repo's Actions settings.

Shape

  • One trailing upload step runs after whichever conditional Polaris scan (push vs. PR) executed. BRANCH resolves to github.head_ref on PRs and github.ref_name on pushes.
  • uvx --from git+…@main polaris-to-sarif invokes the script's console-script entry point directly from the upstream repo — no checkout needed. Once stable, @main can be swapped for a pinned commit SHA or release tag.
  • --polaris-branch-name and --pixee-branch-name are the same value: WebGoat branches match 1:1 between Polaris and SCM.
  • --trigger-analysis kicks off Pixee remediation analysis immediately.
  • if: success() prevents the upload from running if the Polaris scan step failed.

Test plan

  • After merge, the next push/PR triggers CI-Polaris and the new "Upload Polaris results to Pixee" step prints ✓ Successfully uploaded to Pixee! with a Scan ID and Analysis URL.
  • The Analysis URL on edge.getpixee.com shows SAST findings and remediation analysis starting.
  • A Pixeebot remediation PR appears on this repo (if any findings are remediable).

🤖 Generated with Claude Code

mpiroc and others added 2 commits May 22, 2026 15:07
Adds a step to the polaris-scan job that runs
pixee/blackduck-polaris-scripts after each Polaris scan, converting
SAST findings to SARIF and uploading them to edge.getpixee.com for
remediation analysis. Secrets/variables (PIXEE_API_KEY,
POLARIS_PROJECT_ID, POLARIS_PORTFOLIO_ID, PIXEE_REPOSITORY_ID) are
pre-populated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Auto-generated PR comment (Polaris)

❌ Found dependencies violating policy!

Dependency Policies Violated License(s) Vulnerabilities Short Term Recommended Upgrade Long Term Recommended Upgrade Resolved / Filtered Out
HyperSQL Database Engine (org.hsqldb:hsqldb:2.5.2)
  • Unsafe Reflection
N/A ❌   CVE-2022-41853 Critical CVSS 9.8 2.7.4 (0 known vulnerabilities) 2.7.4 (0 known vulnerabilities)

mpiroc and others added 3 commits May 22, 2026 16:04
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pixee/blackduck-polaris-scripts is internal-visibility. Pass a PAT
(PIXEE_SCRIPTS_PAT) embedded in the git URL so the runner can clone it.
Accepts the divergence from the customer flow for this sandbox PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the cross-repo `uvx --from git+...` clone of
pixee/blackduck-polaris-scripts with a checked-in copy under
.pixee/polaris-to-sarif/. Mirrors how customers consume the script
(emailed bundle, committed to their repo) and removes the PAT
requirement.

pyproject.toml carries a one-line local fix to the console-script
entry point (`polaris_to_sarif:main` -> `polaris_to_sarif:app`),
matching pixee/blackduck-polaris-scripts#4. Once that PR merges,
the vendored copy can be re-synced to match upstream pristine.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@mpiroc mpiroc closed this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant