Skip to content

ci: skip dependency-review job on fork repositories (#243) - #254

Closed
AndreasIgel wants to merge 1 commit into
java-helpers:mainfrom
AndreasIgel:test/dependency-review-gate-firing
Closed

ci: skip dependency-review job on fork repositories (#243)#254
AndreasIgel wants to merge 1 commit into
java-helpers:mainfrom
AndreasIgel:test/dependency-review-gate-firing

Conversation

@AndreasIgel

Copy link
Copy Markdown
Collaborator

Fixes #243.

Summary

The dependency-review GitHub Action requires the repository's dependency graph to be enabled. Forks typically do not have this feature enabled, so the action fails on every fork PR. The maven.yml SonarCloud and Codecov upload steps are already gated on the presence of SONAR_TOKEN and CODECOV_TOKEN (they are exposed as job-level env variables and skipped when empty for fork PRs).

Changes

  • Add if: github.event.repository.fork == false to the dependency-review job so it only runs on the upstream/non-fork repository where the dependency graph is available.

Note

Because this workflow uses pull_request_target, the dependency-review check on this PR itself still runs from the main branch workflow file (which does not yet contain the guard). The skip will be active for all subsequent PRs once this change is merged.

This keeps fork PRs green without affecting the upstream repository's security scanning.

Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

The following issues were found:
  • ❌ 1 vulnerable package(s)
  • ❌ 1 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ✅ 0 package(s) with unknown licenses.
See the Details below.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA deb1f9e.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Vulnerabilities

example/pom.xml

NameVersionVulnerabilitySeverity
org.apache.logging.log4j:log4j-core2.14.1Incomplete fix for Apache Log4j vulnerabilitycritical
Remote code injection in Log4jcritical
Apache Log4j2 vulnerable to Improper Input Validation and Uncontrolled Recursionhigh
Only included vulnerabilities with severity high or higher.

License Issues

example/pom.xml

PackageVersionLicenseIssue Type
com.mysql:mysql-connector-j9.1.0GPL-2.0-only WITH Universal-FOSS-exception-1.0 AND LicenseRef-github-OTHERIncompatible License
Allowed Licenses: MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, EPL-1.0, EPL-2.0, CDDL-1.0, CDDL-1.1, ISC, Unlicense, CC0-1.0

OpenSSF Scorecard

PackageVersionScoreDetails
maven/org.apache.logging.log4j:log4j-core 2.14.1 UnknownUnknown
maven/com.mysql:mysql-connector-j 9.1.0 🟢 5.5
Details
CheckScoreReason
Packaging⚠️ -1packaging workflow not detected
Code-Review⚠️ 0Found 0/30 approved changesets -- score normalized to 0
Maintained🟢 1013 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow⚠️ -1no workflows found
Security-Policy🟢 10security policy file detected
Token-Permissions⚠️ -1No tokens found
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
SAST⚠️ 0no SAST tool detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ -1no dependencies found
License🟢 9license file detected
Fuzzing🟢 10project is fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches

Scanned Files

  • example/pom.xml

@AndreasIgel

Copy link
Copy Markdown
Collaborator Author

Wrong source branch

@devin-ai-integration
devin-ai-integration Bot deleted the test/dependency-review-gate-firing branch August 16, 2026 21:08
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.

CI workflow steps fail on fork pull requests due to missing secrets and dependency graph

1 participant