Skip to content

Add GitHub Environment guard for scan-pr when using Maven and Gradle - #1411

Merged
eranturgeman merged 6 commits into
jfrog:mainfrom
eranturgeman:feature/frogbot-v3-env-guard-maven-gradle
Aug 17, 2026
Merged

Add GitHub Environment guard for scan-pr when using Maven and Gradle#1411
eranturgeman merged 6 commits into
jfrog:mainfrom
eranturgeman:feature/frogbot-v3-env-guard-maven-gradle

Conversation

@eranturgeman

@eranturgeman eranturgeman commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator
  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.
  • Update documentation about new features / new supported technologies

Depends on:

This PR adds environment verification for scan-pr flow for Maven and Gradle.
During the scan process the dep-trees plugins are activated and they expose us to untrusted code execution. In order to prevent that we added a guarding functions that verifies the existence of GitHub environment with at least one reviewer - so we can be sure that when Maven and Gradle are being used - a trusted persona has approved the run.
The func checks 3 things:

  1. An environment named 'frogbot' exist
  2. The environment is set in the workflow file
  3. The environment has at least 1 reviewer

@eranturgeman
eranturgeman requested a review from a team August 16, 2026 14:46
@eranturgeman eranturgeman added feature request New feature or request safe to test Approve running integration tests on a pull request labels Aug 16, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 16, 2026
@eranturgeman eranturgeman added safe to test Approve running integration tests on a pull request new feature Automatically generated release notes and removed feature request New feature or request labels Aug 16, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 16, 2026
@eranturgeman eranturgeman changed the title Add Environment guard for scan-pr when using Maven and Gradle Add GitHub Environment guard for scan-pr when using Maven and Gradle Aug 17, 2026

@attiasas attiasas 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.

Nice work, checkout my comments

Comment thread scanpullrequest/scanpullrequest.go
Comment thread scanpullrequest/scanpullrequest.go Outdated
@eranturgeman eranturgeman added the safe to test Approve running integration tests on a pull request label Aug 17, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 17, 2026
@eranturgeman eranturgeman added the safe to test Approve running integration tests on a pull request label Aug 17, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚨 Frogbot scanned this pull request and found the below:

📗 Scan Summary

  • Frogbot scanned for vulnerabilities and found 6 issues
Scan Category Status Security Issues
Software Composition Analysis ✅ Done
6 Issues Found 4 High
2 Medium
Contextual Analysis ✅ Done -
Static Application Security Testing (SAST) ✅ Done Not Found
Secrets ✅ Done Not Found
Infrastructure as Code (IaC) ✅ Done Not Found

📦 Vulnerable Dependencies

Severity ID Contextual Analysis Dependency Path
high
High
CVE-2021-4435 Missing Context -
high
High
CVE-2020-8131 Not Covered -
high
High
CVE-2019-5448 Not Covered -
high
High
CVE-2019-10773 Not Covered -
medium
Medium
CVE-2025-9308 Not Covered -
medium
Medium
CVE-2019-15608 Not Covered -

🔖 Details

[ CVE-2021-4435 ] yarn 1.0.0

Vulnerability Details

Contextual Analysis: Missing Context
CVSS V3: 7.8

An untrusted search path vulnerability was found in Yarn. When a victim runs certain Yarn commands in a directory with attacker-controlled content, malicious commands could be executed in unexpected ways.

[ CVE-2020-8131 ] yarn 1.0.0

Vulnerability Details

Contextual Analysis: Not Covered
CVSS V3: 7.5

Arbitrary filesystem write vulnerability in Yarn 1.21.1 and earlier allows attackers to write to any path on the filesystem and potentially lead to arbitrary code execution by forcing the user to install a malicious package.

[ CVE-2019-5448 ] yarn 1.0.0

Vulnerability Details

Contextual Analysis: Not Covered
CVSS V3: 8.1

Yarn before 1.17.3 is vulnerable to Missing Encryption of Sensitive Data due to HTTP URLs in lockfile causing unencrypted authentication data to be sent over the network.

[ CVE-2019-10773 ] yarn 1.0.0

Vulnerability Details

Contextual Analysis: Not Covered
CVSS V3: 7.8

In Yarn before 1.21.1, the package install functionality can be abused to generate arbitrary symlinks on the host filesystem by using specially crafted "bin" keys. Existing files could be overwritten depending on the current user permission set.

[ CVE-2025-9308 ] yarn 1.0.0

Vulnerability Details

Contextual Analysis: Not Covered
CVSS V3: 5.5

Es wurde eine Schwachstelle in yarnpkg Yarn bis 1.22.22 entdeckt. Betroffen hiervon ist die Funktion setOptions der Datei src/util/request-manager.js. Mittels dem Manipulieren mit unbekannten Daten kann eine inefficient regular expression complexity-Schwachstelle ausgenutzt werden. Der Angriff muss auf lokaler Ebene erfolgen.

[ CVE-2019-15608 ] yarn 1.0.0

Vulnerability Details

Contextual Analysis: Not Covered
CVSS V3: 5.9

The package integrity validation in yarn < 1.19.0 contains a TOCTOU vulnerability where the hash is computed before writing a package to cache. It's not computed again when reading from the cache. This may lead to a cache pollution attack. This issue is fixed in 1.19.0.


@eranturgeman
eranturgeman merged commit 7d2603d into jfrog:main Aug 17, 2026
22 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants