Quick start
Drop this into .github/workflows/bomly-guard.yml. On every pull request the action installs the CLI, diffs the dependency changes, and fails the job when a high-severity finding slips in.
name: Bomly Guard
on:
pull_request:
permissions:
contents: read
pull-requests: write
security-events: write
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: bomly-dev/bomly-guard@v1
with:
fail-on: high
comment-summary-in-pr: on-failure
fetch-depth: 0 matters — the action compares the PR head against the merge base, so it needs enough history to resolve both refs. Pin to @v1 for patch and minor updates, or an exact release for fully reproducible builds.
What it reviews
Guard inspects only the dependency changes the pull request introduces:
New packages
Every dependency the PR adds.
New vulnerabilities
Advisories introduced by the change.
License violations
Allow / deny rules on incoming licenses.
Denied packages
Packages and namespaces you've blocked.
Typosquats
Suspicious names close to protected packages.
Scorecards
OpenSSF Scorecard health signals for incoming projects.
How it works
Guard is a thin composite wrapper around the CLI — all analysis comes from bomly diff, so the policy you enforce locally is the policy it enforces on PRs.
- 1
Compares the PR head against its merge base, so review focuses only on what the PR changes — pre-existing findings are ignored.
- 2
Runs bomly diff with the enrich, audit, and policy flags mapped from your action inputs.
- 3
Writes a job summary and, when you opt in, posts (or updates) a single PR comment.
- 4
Uploads SARIF to the Security tab when audit is on, and fails the job when policy fails the review.
The report
Every run posts a job summary to the Actions tab. When a PR introduces a failing finding, Guard also annotates the check with the count and exits non-zero.
Bomly Diff Summary
Compared 559a762a… to b35e8065…
Overview
| Status | Manifests | Dependencies | Findings | Duration |
|---|---|---|---|---|
| Failing findings | +0 / ~1 / -0 | +0 / ~1 / -0 | 1 introduced / 0 persisted / 0 resolved | 1m 27s |
Dependency Changes
Summary: 0 added, 1 changed, 0 removed.
| Change | Package | Version | Direct? | Scope | Licenses |
|---|---|---|---|---|---|
| changed | struts2-core | 2.5.13 → 2.5.14 | Yes | compile | Apache-2.0 |
Policy Findings
Summary: 1 introduced, 0 persisted, 0 resolved.
| Status | Category | Severity | ID | Package | Fixed In | Title | |
|---|---|---|---|---|---|---|---|
| introduced | vulnerability | HIGH | GHSA-xx7v-hqxh-cjr9 | struts2-core@2.5.14 | 2.5.32 | Apache Struts is Vulnerable to DoS via File Leak |
Annotations · 1 error
Inline diff annotations
Guard writes the job summary in Markdown and uploads the same findings as SARIF. That SARIF feed drives GitHub's native code scanning UI, which surfaces each finding in three places: inline on the Files changed tab, rolled up on the Checks tab, and as a standalone alert under Security → Code scanning. First, inline — right under the line that introduced it:
Apache Struts is Vulnerable to DoS via File Leak
Apache Struts is Vulnerable to DoS via File Leak in pkg:maven/org.apache.struts/struts2-core@2.5.14
…and on the Checks tab
Every alert also rolls up into a single Code scanning results check run, so reviewers get the totals at a glance without scrolling the diff:
failed yesterday in 2s
14 new alerts including 5 critical severity security vulnerabilities
New alerts in code changed by this pull request
Security Alerts:
- 5 critical
- 8 high
- 1 medium
See annotations below for details.
View all branch alerts.
Annotations
Code scanning / bomly
Apache Struts is Vulnerable to DoS via File Leak
HighApache Struts is Vulnerable to DoS via File Leak in pkg:maven/org.apache.struts/struts2-core@2.5.14
…and 13 more annotations.
…and as a standalone alert
Following Show more details (or View detailson the inline annotation) opens the alert's own page under Security → Code scanning — severity, the offending line, the rule that fired, and where it first appeared.
Package manager setup
Bomly Guard installs the Bomly CLI — not project package managers. Add ecosystem setup steps before the Guard action when your project needs them.
Many repositories can be reviewed from committed lockfiles alone. Build-tool-backed detectors (Dart pub, SwiftPM, SBT) produce richer graphs when their build tool is present; any detector may also need its package manager when install-first is enabled. Note that install-first tells CLI detectors to install project dependencies before resolving graphs — it does not install the package-manager binary itself.
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- uses: bomly-dev/bomly-guard@v1
with:
fail-on: high
install-first: true
See the Bomly Guard README for the full per-ecosystem setup reference.