Skip to content

feat: enable .csproj and nugetcpm source scanning - #2799

Merged
another-rex merged 3 commits into
google:mainfrom
another-rex:enable-dotnet-source-scanning-20260513
May 14, 2026
Merged

another-rex merged 3 commits into
google:mainfrom
another-rex:enable-dotnet-source-scanning-20260513

Conversation

@another-rex

@another-rex another-rex commented May 14, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

Enables .csproj and nugetcpm (Central Package Management) plugins by default for source scanning in osv-scanner.
Related to osv-scalibr PR google/osv-scalibr#1779.

Details

  • Registered dotnet/csproj and dotnet/nugetcpm extractors in the lockfile preset used for default source scanning.
  • Added e2e test files under ./cmd/osv-scanner/scan/source/testdata/locks-dotnet and verified extraction and vulnerability detection.

Testing

  • Added Scan_locks-dotnet test case to TestCommand suite.
  • Ran go test ./cmd/osv-scanner/scan/source/... and all tests pass.

Checklist

@another-rex
another-rex requested review from Ly-Joey and cuixq May 14, 2026 22:13
@another-rex
another-rex enabled auto-merge (squash) May 14, 2026 22:14
@another-rex
another-rex disabled auto-merge May 14, 2026 23:32
@another-rex
another-rex merged commit 78ffbe2 into google:main May 14, 2026
14 of 17 checks passed
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
osv-scanner 2.4.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>### Features:

- [Feature #2815](google/osv-scanner#2815) Add support for the CycloneDX 1.7 specification (bumps `cyclonedx-go` to v0.11.0).
- [Feature #2799](google/osv-scanner#2799) Enable `.csproj` and Central Package Management (`nugetcpm`) source scanning plugins by default.
- [Feature #2871](google/osv-scanner#2871) Extract and parse Alpine OS distro version (e.g. `Alpine:v3.17`, `Alpine:edge`) from PURL `distro` qualifiers to scan packages under their respective Alpine ecosystems.
- [Feature #2801](google/osv-scanner#2801) Enable the `swift/packageresolved` plugin by default to support SwiftURL vulnerability scans.
- [Feature #2666](google/osv-scanner#2666) Add a Docker-based variant of the pre-commit hook in `.pre-commit-hooks.yaml` to avoid local compilation.
- [Feature #2637](google/osv-scanner#2637) Add a new configuration setting `ScanGoModVersion` (disabled by default) to avoid parsing toolchain version directives directly from `go.mod`, preventing misleading warnings.
- [Feature #2772](google/osv-scanner#2772) Scan container images built with Canonical Chisel by enabling the `os/chisel` extractor plugin.

### Fixes:

- [Bug #2807](google/osv-scanner#2807) Sanitize package name, source, and version fields in the vertical output format to prevent GitHub Actions workflow command injection vulnerabilities from crafted lock files.
- [Bug #2876](google/osv-scanner#2876) Improve HTML scan report usability by supporting standard click modifiers (Ctrl/Cmd/middle click) to open vulnerabilities in new tabs, and preserving scroll position when switching tabs.
- [Bug #2783](google/osv-scanner#2783) Keep transitive dependency scanning enabled when specifying the `--offline-vulnerabilities` flag.
- [Bug #2808](google/osv-scanner#2808) Deduplicate equivalent OSV matcher requests before executing bulk queries to reduce API overhead.
- [Bug #2837](google/osv-scanner#2837) Prevent panics during offline matcher scans (e.g. on unsupported `GitHub Actions` ecosystem) by avoiding parsing errors when checking version ranges.
- [Bug #2836](google/osv-scanner#2836) Ensure the scanner returns an exit code of `0` when `--help` or `-h` is explicitly requested.

### Misc:

- Update Go version to 1.26.4.
- Update `osv-scalibr` to `v0.4.6-0.20260612031204-164402d9140e`.
- Tag built Docker and GitHub Action images with the major version (e.g. `:v2`) to allow users to pin to a major version (#2857).

## New Contributors
* @herdiyana256 made their first contribution in google/osv-scanner#2801
* @zhijie-yang made their first contribution in google/osv-scanner#2772
* @francose made their first contribution in google/osv-scanner#2837
* @rohan-patnaik made their first contribution in google/osv-scanner#2808
* @evilgensec made their first contribution in google/osv-scanner#2807
* @gotgolem made their first contribution in google/osv-scanner#2783
* @Khuzaimx made their first contribution in google/osv-scanner#2857

**Full Changelog**: https://github.com/google/osv-scanner/compare/v2.3.8...v2.4.0</pre>
  <p>View the full release notes at <a href="https://github.com/google/osv-scanner/releases/tag/v2.4.0">https://github.com/google/osv-scanner/releases/tag/v2.4.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!11903
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.

2 participants