Skip to content

Commit

Permalink
Merge branch 'main' into logo
Browse files Browse the repository at this point in the history
  • Loading branch information
jess-lowe committed Jan 30, 2025
2 parents bffe3dc + cd7cc8a commit 564adbf
Show file tree
Hide file tree
Showing 287 changed files with 2,637 additions and 1,274 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: stable
check-latest: true
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
name: image-fixtures-${{ github.run_number }}-${{ github.run_attempt }}
path: internal/image/fixtures/
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: stable
check-latest: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Update go to the latest version to support minor go versions is go.mod file
- name: Install Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -59,7 +59,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -73,4 +73,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: stable
check-latest: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/osv-scanner-reusable-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
if: ${{ !cancelled() && inputs.upload-sarif == true }}
uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
with:
sarif_file: ${{ inputs.results-file-name }}
2 changes: 1 addition & 1 deletion .github/workflows/osv-scanner-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
if: "${{ !cancelled() && inputs.upload-sarif == true }}"
uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
with:
sarif_file: ${{ inputs.results-file-name }}
6 changes: 3 additions & 3 deletions .github/workflows/prerelease-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
persist-credentials: false
ref: ${{ inputs.commit }}
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: stable
check-latest: true
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
name: image-fixtures-${{ github.run_number }}-${{ github.run_attempt }}
path: internal/image/fixtures/
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: stable
check-latest: true
Expand All @@ -117,7 +117,7 @@ jobs:
persist-credentials: false
ref: ${{ inputs.commit }}
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: stable
check-latest: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/renovate-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Nodes.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
with:
sarif_file: results.sarif
12 changes: 6 additions & 6 deletions .github/workflows/semantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.10"
- run: dpkg --version
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.10"
- run: sudo apt install rpm
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.10"
- name: setup dependencies
Expand All @@ -139,7 +139,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: ruby/setup-ruby@28c4deda893d5a96a6b2d958c5b47fc18d65c9d3 # v1.213.0
- uses: ruby/setup-ruby@1287d2b408066abada82d5ad1c63652e758428d9 # v1.214.0
with:
ruby-version: "3.1"
- name: setup dependencies
Expand All @@ -159,7 +159,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
- uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
java-version: 17
distribution: oracle
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: stable
cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staleness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
with:
days-before-stale: 60
days-before-close: 14
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ runs:
# codecov is currently being flakey on macOS
# https://github.com/codecov/codecov-action/issues/1416
if: ${{ runner.os != 'macOS' }}
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
with:
token: ${{ inputs.codecov_token }}
fail_ci_if_error: true
10 changes: 5 additions & 5 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ linters-settings:
settings:
printf:
funcs:
- (github.com/google/osv-scanner/pkg/reporter.Reporter).Errorf
- (github.com/google/osv-scanner/pkg/reporter.Reporter).Warnf
- (github.com/google/osv-scanner/pkg/reporter.Reporter).Verbosef
- (github.com/google/osv-scanner/pkg/reporter.Reporter).Infof
- (github.com/google/osv-scanner/v2/pkg/reporter.Reporter).Errorf
- (github.com/google/osv-scanner/v2/pkg/reporter.Reporter).Warnf
- (github.com/google/osv-scanner/v2/pkg/reporter.Reporter).Verbosef
- (github.com/google/osv-scanner/v2/pkg/reporter.Reporter).Infof
depguard:
rules:
regexp:
Expand All @@ -49,7 +49,7 @@ linters-settings:
- "!**/main_test.go"
deny:
- pkg: "regexp"
desc: "Use github.com/google/osv-scanner/internal/cachedregexp instead"
desc: "Use github.com/google/osv-scanner/v2/internal/cachedregexp instead"
gocritic:
disabled-checks:
- ifElseChain
Expand Down
6 changes: 3 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ builds:
- -trimpath
ldflags:
# prettier-ignore
- '-s -w -X github.com/google/osv-scanner/internal/version.OSVVersion={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}}'
- '-s -w -X github.com/google/osv-scanner/v2/internal/version.OSVVersion={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}}'
goos:
# Further testing before supporting freebsd
# - freebsd
Expand Down Expand Up @@ -46,7 +46,7 @@ builds:
- -trimpath
ldflags:
# prettier-ignore
- '-s -w -X github.com/google/osv-scanner/internal/version.OSVVersion={{.Version}}_GHAction -X main.commit={{.Commit}} -X main.date={{.CommitDate}}'
- '-s -w -X github.com/google/osv-scanner/v2/internal/version.OSVVersion={{.Version}}_GHAction -X main.commit={{.Commit}} -X main.date={{.CommitDate}}'
goos:
- linux
goarch:
Expand All @@ -62,7 +62,7 @@ builds:
- -trimpath
ldflags:
# prettier-ignore
- '-s -w -X github.com/google/osv-scanner/internal/version.OSVVersion={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}}'
- '-s -w -X github.com/google/osv-scanner/v2/internal/version.OSVVersion={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}}'
goos:
- linux
goarch:
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
<img src="/docs/images/osv-scanner-full-logo-lightmode.svg">
</picture>

---

[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/google/osv-scanner/badge)](https://scorecard.dev/viewer/?uri=github.com/google/osv-scanner)
[![Go Report Card](https://goreportcard.com/badge/github.com/google/osv-scanner)](https://goreportcard.com/report/github.com/google/osv-scanner)
[![codecov](https://codecov.io/gh/google/osv-scanner/graph/badge.svg?token=C8IDVX9LP5)](https://codecov.io/gh/google/osv-scanner)
[![SLSA 3](https://slsa.dev/images/gh-badge-level3.svg)](https://slsa.dev)
[![GitHub Release](https://img.shields.io/github/v/release/google/osv-scanner)](https://github.com/google/osv-scanner/releases)

Use OSV-Scanner to find existing vulnerabilities affecting your project's dependencies.
Use OSV-Scanner to find existing vulnerabilities affecting your project's dependencies.
OSV-Scanner provides an officially supported frontend to the [OSV database](https://osv.dev/) and CLI interface to [OSV-Scalibr](https://github.com/google/osv-scalibr) that connects a project’s list of dependencies with the vulnerabilities that affect them.

OSV-Scanner supports a wide range of project types, package managers and features, including but not limited to:
Expand All @@ -37,8 +35,8 @@ The above all results in accurate and actionable vulnerability notifications, wh

## Basic installation

To install OSV-Scanner, please refer to the [installation section](https://google.github.io/osv-scanner/installation) of our documentation. OSV-Scanner releases can be found on the [releases page](https://github.com/google/osv-scanner/releases) of the GitHub repository. The recommended method is to download a prebuilt binary for your platform. Alternatively, you can use
`go install github.com/google/osv-scanner/cmd/osv-scanner@v2.0.0-beta1`.
To install OSV-Scanner, please refer to the [installation section](https://google.github.io/osv-scanner/installation) of our documentation. OSV-Scanner releases can be found on the [releases page](https://github.com/google/osv-scanner/releases) of the GitHub repository. The recommended method is to download a prebuilt binary for your platform. Alternatively, you can use
`go install github.com/google/osv-scanner/v2/cmd/osv-scanner@latest` to build it from source.

## Key Features

Expand Down Expand Up @@ -110,7 +108,7 @@ osv-scanner --experimental-offline --experimental-download-offline-databases ./p

### [Guided Remediation](https://google.github.io/osv-scanner/experimental/guided-remediation/) (Experimental)

OSV-Scanner provides guided remediation, a feature that suggests package version upgrades based on criteria such as dependency depth, minimum severity, fix strategy, and return on investment.
OSV-Scanner provides guided remediation, a feature that suggests package version upgrades based on criteria such as dependency depth, minimum severity, fix strategy, and return on investment.
We currently support remediating vulnerabilities in the following files:

| Ecosystem | File Format (Type) | Supported Remediation Strategies |
Expand Down
10 changes: 5 additions & 5 deletions cmd/osv-reporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"os"
"strings"

"github.com/google/osv-scanner/internal/ci"
"github.com/google/osv-scanner/internal/version"
"github.com/google/osv-scanner/pkg/models"
"github.com/google/osv-scanner/pkg/osvscanner"
"github.com/google/osv-scanner/pkg/reporter"
"github.com/google/osv-scanner/v2/internal/ci"
"github.com/google/osv-scanner/v2/internal/version"
"github.com/google/osv-scanner/v2/pkg/models"
"github.com/google/osv-scanner/v2/pkg/osvscanner"
"github.com/google/osv-scanner/v2/pkg/reporter"
"github.com/urfave/cli/v2"
"golang.org/x/term"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/osv-scanner/fix/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"

tea "github.com/charmbracelet/bubbletea"
"github.com/google/osv-scanner/internal/remediation"
"github.com/google/osv-scanner/v2/internal/remediation"
)

// TODO: currently, it's impossible to undo commands
Expand Down
28 changes: 14 additions & 14 deletions cmd/osv-scanner/fix/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ import (
"time"

"deps.dev/util/resolve"
"github.com/google/osv-scanner/internal/clients/clientimpl/localmatcher"
"github.com/google/osv-scanner/internal/clients/clientimpl/osvmatcher"
"github.com/google/osv-scanner/internal/depsdev"
"github.com/google/osv-scanner/internal/imodels/ecosystem"
"github.com/google/osv-scanner/internal/osvdev"
"github.com/google/osv-scanner/internal/remediation"
"github.com/google/osv-scanner/internal/remediation/upgrade"
"github.com/google/osv-scanner/internal/resolution"
"github.com/google/osv-scanner/internal/resolution/client"
"github.com/google/osv-scanner/internal/resolution/lockfile"
"github.com/google/osv-scanner/internal/resolution/manifest"
"github.com/google/osv-scanner/internal/resolution/util"
"github.com/google/osv-scanner/internal/version"
"github.com/google/osv-scanner/pkg/reporter"
"github.com/google/osv-scanner/v2/internal/clients/clientimpl/localmatcher"
"github.com/google/osv-scanner/v2/internal/clients/clientimpl/osvmatcher"
"github.com/google/osv-scanner/v2/internal/depsdev"
"github.com/google/osv-scanner/v2/internal/imodels/ecosystem"
"github.com/google/osv-scanner/v2/internal/osvdev"
"github.com/google/osv-scanner/v2/internal/remediation"
"github.com/google/osv-scanner/v2/internal/remediation/upgrade"
"github.com/google/osv-scanner/v2/internal/resolution"
"github.com/google/osv-scanner/v2/internal/resolution/client"
"github.com/google/osv-scanner/v2/internal/resolution/lockfile"
"github.com/google/osv-scanner/v2/internal/resolution/manifest"
"github.com/google/osv-scanner/v2/internal/resolution/util"
"github.com/google/osv-scanner/v2/internal/version"
"github.com/google/osv-scanner/v2/pkg/reporter"
"github.com/ossf/osv-schema/bindings/go/osvschema"
"github.com/urfave/cli/v2"
"golang.org/x/term"
Expand Down
4 changes: 2 additions & 2 deletions cmd/osv-scanner/fix/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"slices"
"testing"

"github.com/google/osv-scanner/internal/remediation/upgrade"
"github.com/google/osv-scanner/pkg/reporter"
"github.com/google/osv-scanner/v2/internal/remediation/upgrade"
"github.com/google/osv-scanner/v2/pkg/reporter"
"github.com/urfave/cli/v2"
)

Expand Down
12 changes: 6 additions & 6 deletions cmd/osv-scanner/fix/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"github.com/charmbracelet/bubbles/key"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/google/osv-scanner/internal/remediation"
"github.com/google/osv-scanner/internal/resolution"
"github.com/google/osv-scanner/internal/resolution/client"
manif "github.com/google/osv-scanner/internal/resolution/manifest"
"github.com/google/osv-scanner/internal/tui"
osvLockfile "github.com/google/osv-scanner/pkg/lockfile"
"github.com/google/osv-scanner/v2/internal/remediation"
"github.com/google/osv-scanner/v2/internal/resolution"
"github.com/google/osv-scanner/v2/internal/resolution/client"
manif "github.com/google/osv-scanner/v2/internal/resolution/manifest"
"github.com/google/osv-scanner/v2/internal/tui"
osvLockfile "github.com/google/osv-scanner/v2/pkg/lockfile"
"golang.org/x/term"
)

Expand Down
Loading

0 comments on commit 564adbf

Please sign in to comment.