Skip to content

Code reachability

A CVE in a library of your application does not always carry the same urgency: it may affect a deployed dependency, a transitive dependency your code does not declare itself, or a mere development tool (test framework, linter) that never ships to production. TechWatchAlert reads this from your files and uses it to order and explain alerts.

Each time a GitHub or GitLab repository is read, or an SBOM or manifest is imported (or pushed by CI), TechWatchAlert records for each component:

  • its scope: runtime, development, test, optional, build, or unknown;
  • its depth: direct (your project declares it) or transitive (pulled in by another dependency).
File What is read
package-lock.json, pnpm-lock.yaml development and optional dependencies, direct or transitive
yarn.lock with the package.json in the same folder: dependencies or devDependencies, and what they pull in
Pipfile.lock, poetry.lock default / develop sections, Poetry groups (with the neighbouring pyproject.toml for recent files)
requirements-dev.txt, requirements/test.txt… development or test, from the file name
composer.lock packages / packages-dev
pom.xml Maven scope (test, build plugins)
go.mod, Cargo.lock, Gemfile.lock direct or transitive (// indirect, your packages’ dependencies, DEPENDENCIES section)
CycloneDX, SPDX SBOM scope, properties of the producing tool, dependency graph, SPDX relationships

The dependency graph computed by GitHub does not state scope: its components stay “unknown”. The same component can be a runtime dependency in one repository and a development tool in another: it counts as deployed as soon as one of its sources deploys it, or a source does not say.

  • Badges in the list and on the record: Dev dependency, Transitive, Vulnerable code not called (with the tool and the analysed commit), Vulnerable code called. A direct, deployed dependency has no badge: that is the ordinary case.
  • Why this alert? adds two steps: the dependency’s scope (and the file that states it), then reachability. When the advisory publishes the vulnerable function (Go vulnerability database, RustSec, some GitHub advisories), it is quoted: “the flaw is in function X of module Y; a call analysis would tell whether your code calls it”.
  • Order: with the default sort (tier then due date), cases within the same tier are ordered: code called, direct or unknown dependency, transitive, code not called, dev or test dependency. Then the due date, then the EPSS percentile.
  • Filters (advanced filters panel): Reachability and Dependency scope (deployed, or dev and test only).

In the organization’s or project’s Prioritization tab, the Development dependencies block offers three settings:

Setting Effect
Alert (default) Like any alert. The case is only ordered at the bottom of its tier.
Flag only The alert is created, visible and filterable, marked “not deployed”, without notification. Known exploitation (KEV, CERT-FR) always notifies.
Ignore No alert. An open case becomes Not applicable, reason “Development dependency”, signed TechWatchAlert. If the dependency becomes deployed, or you change the setting, the case reopens with its previous status.

A call-analysis tool run in your CI on your code can tell whether the vulnerable function is actually called. TechWatchAlert receives its result as VEX (OpenVEX or CycloneDX): govulncheck -format openvex for Go, osv-scanner for other ecosystems.

  1. Push the application’s SBOM or lockfile from CI, with the commit (POST /api/v1/organizations/{org}/projects/{project}/sbom?application=…&commit=…, API key with the sbom scope).
  2. Run the analysis and push its VEX for the same application and commit (POST …/sbom/vex?application=…&commit=…).
  3. On the record, a “not called” VEX proposes to mark the case Not applicable, reason “Vulnerable code not in execute path”, with the evidence (tool, commit, date). Nothing is marked without your click.

The proposal expires as soon as a newer commit of the application is pushed without being analysed: the evidence only holds for the code it saw. An “affected” VEX marks the code as called: the case moves to the top of its tier.

Example GitHub Actions workflow (Go):

name: TechWatchAlert
on:
push:
branches: [main]
jobs:
reachability:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Push go.mod
run: |
curl -fsS -X POST \
-H "Authorization: Bearer ${{ secrets.TWA_SBOM_KEY }}" \
--data-binary @go.mod \
"https://app.techwatchalert.com/api/v1/organizations/${{ vars.TWA_ORG }}/projects/${{ vars.TWA_PROJECT }}/sbom?application=${{ github.repository }}&fichier=go.mod&commit=${{ github.sha }}"
- name: Call analysis (govulncheck)
run: go run golang.org/x/vuln/cmd/govulncheck@latest -format openvex ./... > vex.json
- name: Push the VEX
run: |
curl -fsS -X POST \
-H "Authorization: Bearer ${{ secrets.TWA_SBOM_KEY }}" \
-H "Content-Type: application/json" \
--data-binary @vex.json \
"https://app.techwatchalert.com/api/v1/organizations/${{ vars.TWA_ORG }}/projects/${{ vars.TWA_PROJECT }}/sbom/vex?application=${{ github.repository }}&commit=${{ github.sha }}"