Review dependency alerts
See which locked dependencies have known vulnerabilities, scan again, and dismiss what does not apply.
The lockfiles and manifests on the default branch (package-lock.json, pnpm-lock.yaml,
yarn.lock, bun.lock, go.mod, go.sum, Cargo.lock, poetry.lock, Pipfile.lock,
uv.lock, requirements.txt, Gemfile.lock, composer.lock, pom.xml, gradle.lockfile and
others) are matched against the vulnerability database a minute after a push and once a day.
Lockfiles under node_modules, vendor, third_party and fixture or testdata directories are
skipped. Each finding names the package, the installed and the fixed version, the advisory and
the lockfile. The examples use the repository id 5d6c2a1e-7b3f-4c8d-9e0a-1b2c3d4e5f60.
Prerequisites
- Permission for
git:ListSecurityAlertsto read alerts, andgit:UpdateSecurityAlertto scan, dismiss or reopen. - In the Deutsche Cloud Console, also
git:GetRepositoryto open the repository's Security section (without it the page is not found). - Dependency alerts are on for the repository (the default). With them off, Scan now is not
shown and a scan is refused with 409
Dependency alerts are off for this repository.
Scan now
- In the repository, choose Security.
- On Overview, next to Dependency alerts, choose Scan now. The line under Dependency alerts says when the scan is running and when it ends; the findings are listed under Dependencies.
dcloud git security scan-dependencies 5d6c2a1e-7b3f-4c8d-9e0a-1b2c3d4e5f60POST /git/api/repositories/5d6c2a1e-7b3f-4c8d-9e0a-1b2c3d4e5f60/security/dependency-alerts/scanDismiss an alert
A dismissal takes a reason (false positive, not exploitable, accepted risk, fix later, or
your own words) and an optional comment, and stays through later scans until you reopen the
alert.
- In the repository, choose Security, then Dependencies.
- Choose All findings, then choose the finding.
- Under Dismiss, choose a reason and (optional) enter a comment.
- Choose Dismiss. The alert leaves the list; Show … dismissed lists it again, with Reopen.
dcloud git security set-dependency-alert 5d6c2a1e-7b3f-4c8d-9e0a-1b2c3d4e5f60 \
f0e1d2c3-b4a5-4968-8776-655443322110 --state dismissed --reason "not exploitable"PATCH /git/api/repositories/5d6c2a1e-7b3f-4c8d-9e0a-1b2c3d4e5f60/security/dependency-alerts/f0e1d2c3-b4a5-4968-8776-655443322110
{ "state": "dismissed", "reason": "not exploitable" }Result
An open finding the next scan no longer reports becomes fixed; one that comes back is open
again.
For npm and pnpm lockfiles, Open a fix pull request on a package (or Fix all fixable)
has the platform push a branch that bumps the versions and open a pull request, so CI runs; it
never merges (dcloud git security fix-dependencies, which also needs git:PushRepository and
git:CreatePullRequest). A second fix for a package whose fix pull request is open is refused
with 409 A fix pull request is already open: #<n>. For other ecosystems, upgrade to the fixed
version yourself.
Related
Related