Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating docs branch for the release. #689

Closed
wants to merge 51 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
f1e0e5b
handle npm aliased packages (#610)
cuixq Oct 26, 2023
073639f
chore(deps): update workflows (#596)
renovate-bot Oct 27, 2023
8340d5a
chore(deps): update dependency jekyll-feed to v0.17.0 (#597)
renovate-bot Oct 27, 2023
4d4ad2a
chore(deps): update github/codeql-action action to v2.22.5 (#616)
renovate-bot Oct 29, 2023
ffa5425
fix(deps): update osv-scanner minor (#618)
renovate-bot Oct 30, 2023
419a945
fix: handle yarn aliased packages (#615)
G-Rath Oct 30, 2023
f819495
Scan submodules too. (#581)
andrewpollock Oct 30, 2023
5a02f6c
Go binary not found should not be an error (#622)
another-rex Oct 31, 2023
130254c
Fix gitignore matching for root directory (#626)
michaelkedar Nov 1, 2023
b099238
Fix permissions in PR osv-scanner (#625)
another-rex Nov 1, 2023
ac2897c
Refactor package scanning to produce packages instead of queries (#614)
josieang Nov 1, 2023
2b7f858
Add support for determineversions API (#612). (#621)
oliverchang Nov 1, 2023
6316373
Prepare for v1.4.3 release (#629)
cuixq Nov 2, 2023
b71205c
Minor github action docs changes to clarify behaviour. (#630)
another-rex Nov 2, 2023
f08125b
test: check against error type rather than message (#628)
G-Rath Nov 2, 2023
4aed961
upgrade version of Go in GitHub checks (#637)
josieang Nov 3, 2023
a85d675
license checking experimental feature (#501)
josieang Nov 5, 2023
8996ffa
Filter local packages from scanning, and report the filtering. (#643)
another-rex Nov 6, 2023
8fef787
fix(deps): update osv-scanner minor (#641)
renovate-bot Nov 6, 2023
0599ed3
test: don't ignore anything from coverage (#627)
G-Rath Nov 9, 2023
161f26d
fix: properly handle file/url paths on Windows (#645)
G-Rath Nov 9, 2023
57ba6ce
chore(deps): update golang:alpine docker digest to 110b07a (#640)
renovate-bot Nov 9, 2023
007b8e4
Downgrade jekyll-feed. Update lock file (#650)
Nov 10, 2023
c1ea22e
cmd/osv-scanner: update sarif output in test cases (#659)
cuixq Nov 16, 2023
774df1d
Adding C/C++ info to the docs (#648)
Nov 16, 2023
f37072f
ci: enforce that `cachedregexp` is always used instead of `regexp` (#…
G-Rath Nov 17, 2023
9e18c1f
fix: remove noise lockfile warnings (#660)
G-Rath Nov 20, 2023
e62c1b0
chore: disable `goconst` linter (#662)
G-Rath Nov 20, 2023
a3bda96
Don't include nested vendored libs in determineversions query. (#649)
oliverchang Nov 21, 2023
0e0d6fd
ci: update `golangci-lint` to v1.54 (#661)
G-Rath Nov 21, 2023
eb862fd
feat: add support for comparing CRAN versions (#656)
G-Rath Nov 21, 2023
521f59c
ci: run tests on Windows (#646)
G-Rath Nov 21, 2023
54d61f3
make license allowlist matching case insensitive (#672)
josieang Nov 23, 2023
1bd6916
refactor: upgrade golangci-lint (#673)
G-Rath Nov 23, 2023
8c5634d
fix(deps): update osv-scanner minor (#652)
renovate-bot Nov 23, 2023
aa3ca89
Simplify return codes to return 1 if any vulnerability related error …
another-rex Nov 27, 2023
e99410e
feat: add support for `renv.lock` (#668)
G-Rath Nov 27, 2023
7712ad4
Fix filter ids (#647)
another-rex Nov 27, 2023
076aafd
Set Go call analysis to default behaviour (#665)
hogo6002 Nov 28, 2023
4a849b8
add experimental-licenses summary flag (#678)
josieang Nov 28, 2023
98933ac
Setup manual release pipeline (#681)
another-rex Nov 29, 2023
9b47887
update docs for call analysis. (#682)
hogo6002 Nov 29, 2023
ee537b2
Added license scanning info (#674)
Nov 29, 2023
bb13619
chore(deps): update workflows (#666)
renovate-bot Nov 29, 2023
a254b1d
feat: CVSS v4.0 support and replace cvss implementation to comply wit…
pandatix Nov 30, 2023
9b4d714
Fix goreleaser build (#683)
another-rex Dec 1, 2023
b7ef0d7
Add `osv-scanner` pre-commit hook (#669)
kemzeb Dec 1, 2023
289f653
fix(deps): update osv-scanner minor (#688)
renovate-bot Dec 3, 2023
d5052e7
chore(deps): update alpine:3.18 docker digest to 34871e7 (#686)
renovate-bot Dec 3, 2023
979ca0b
chore(deps): update golang:alpine docker digest to 70afe55 (#687)
renovate-bot Dec 3, 2023
56a6590
Include available formats in `--format` help message (#685)
kemzeb Dec 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
uses: github/codeql-action/init@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -55,7 +55,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@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
uses: github/codeql-action/autobuild@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
uses: github/codeql-action/analyze@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
80 changes: 3 additions & 77 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,96 +1,23 @@
name: Release new version

on:
workflow_dispatch:
inputs:
version:
description: 'The version tag to release, (e.g. v1.2.3)'
required: true
type: string
commit:
description: 'The commit hash to release'
required: true
type: string
push:
tags:
- "*" # triggers only if push new tag version, like `v0.8.4`

permissions:
contents: read # to fetch code (actions/checkout)
# Require writing security events to upload SARIF file to security tab
security-events: write

jobs:
osv-scan:
uses: ./.github/workflows/osv-scanner-reusable.yml
with:
# Only scan the top level go.mod file without recursively scanning directories since
# this is pipeline is about releasing the go module and binary
scan-args: |-
--skip-git
./

lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false
ref: ${{ inputs.commit }}
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: .go-version
check-latest: true
- name: Run lint action
uses: ./.github/workflows/lint-action
tests:
name: Run unit tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false
ref: ${{ inputs.commit }}
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: .go-version
check-latest: true
- name: Run test action
uses: ./.github/workflows/test-action
tag-release:
runs-on: ubuntu-latest
needs:
- lint
- tests
- osv-scan
permissions:
contents: write # to write a tag
steps:
- name: Create tag
uses: actions/github-script@v6
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ inputs.version }}',
sha: '${{ inputs.commit }}'
})
goreleaser:
outputs:
hashes: ${{ steps.hash.outputs.hashes }}
permissions:
contents: write # for goreleaser/goreleaser-action to create a GitHub release
packages: write # for goreleaser/goreleaser-action to publish docker images
runs-on: ubuntu-latest
needs:
- tag-release
env:
# Required for buildx on docker 19.x
DOCKER_CLI_EXPERIMENTAL: "enabled"
Expand Down Expand Up @@ -140,4 +67,3 @@ jobs:
base64-subjects: "${{ needs.goreleaser.outputs.hashes }}"
upload-assets: true # upload to a new release
draft-release: true # upload to a new draft release
upload-tag-name: "${{ inputs.version }}"
2 changes: 1 addition & 1 deletion .github/workflows/link-check-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: gaurav-nelson/github-action-markdown-link-check@a996638015fbc9ef96beef1a41bbad7df8e06154
- uses: gaurav-nelson/github-action-markdown-link-check@0f074c8562c5a8fed38282b7c741d1970bb1512d
with:
use-quiet-mode: "yes"
base-branch: "main"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: gaurav-nelson/github-action-markdown-link-check@a996638015fbc9ef96beef1a41bbad7df8e06154
- uses: gaurav-nelson/github-action-markdown-link-check@0f074c8562c5a8fed38282b7c741d1970bb1512d
with:
use-quiet-mode: "yes"
# Documentation available here: https://github.com/marketplace/actions/markdown-link-check
4 changes: 2 additions & 2 deletions .github/workflows/lint-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ runs:
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.51.1
version: v1.55.2
# https://github.com/golangci/golangci-lint-action/issues/135
skip-pkg-cache: true
skip-pkg-cache: true
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 @@ -95,6 +95,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
if: '!cancelled()'
uses: github/codeql-action/upload-sarif@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
uses: github/codeql-action/upload-sarif@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.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 @@ -78,7 +78,7 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
if: '!cancelled()'
uses: github/codeql-action/upload-sarif@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
uses: github/codeql-action/upload-sarif@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
with:
sarif_file: ${{ inputs.results-file-name }}

81 changes: 81 additions & 0 deletions .github/workflows/prerelease-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Pre-release check

on:
workflow_dispatch:
inputs:
version:
description: 'The version tag to release, (e.g. v1.2.3)'
required: true
type: string
commit:
description: 'The commit hash to release'
required: true
type: string

permissions:
contents: read # to fetch code (actions/checkout)
# Require writing security events to upload SARIF file to security tab
security-events: write

Check failure

Code scanning / Scorecard

Token-Permissions High

score is 5: topLevel 'security-events' permission set to 'write'
Remediation tip: Visit https://app.stepsecurity.io/secureworkflow.
Tick the 'Restrict permissions for GITHUB_TOKEN'
Untick other options
NOTE: If you want to resolve multiple issues at once, you can visit https://app.stepsecurity.io/securerepo instead.
Click Remediation section below for further remediation help

jobs:
osv-scan:
uses: ./.github/workflows/osv-scanner-reusable.yml
with:
# Only scan the top level go.mod file without recursively scanning directories since
# this is pipeline is about releasing the go module and binary
scan-args: |-
--skip-git
./

lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false
ref: ${{ inputs.commit }}
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: .go-version
check-latest: true
- name: Run lint action
uses: ./.github/workflows/lint-action
tests:
name: Run unit tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false
ref: ${{ inputs.commit }}
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: .go-version
check-latest: true
- name: Run test action
uses: ./.github/workflows/test-action
release-helper:
runs-on: ubuntu-latest
needs:
- lint
- tests
- osv-scan
steps:
- name: Print Scripts
env:
OUTPUT: |
git fetch upstream &&
git tag ${{ inputs.version }} ${{ inputs.commit }} &&
git push upstream ${{ inputs.version }}
shell: bash
run: |
echo $OUTPUT
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 # v2.3.0
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
Expand Down Expand Up @@ -67,6 +67,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
uses: github/codeql-action/upload-sarif@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.19
1.20
12 changes: 11 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ linters:
- testpackage # will re-add later (another-rex)
- goerr113 # will re-add later (another-rex)
- nonamedreturns # disagree with, for now (another-rex)
- depguard # not necessary at the moment (another-rex)
- goconst # not everything should be a constant
presets:
- bugs
- comment
Expand All @@ -42,6 +42,16 @@ linters:
- unused

linters-settings:
depguard:
rules:
regexp:
files:
- '!**/internal/cachedregexp/**'
- '!**/main_test.go'
deny:
- pkg: 'regexp'
desc:
'Use github.com/google/osv-scanner/internal/cachedregexp instead'
gocritic:
disabled-checks:
- ifElseChain
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ builds:
# Further testing before supporting arm
# - arm
- arm64
main: ./cmd/osv-scanner/main.go
main: ./cmd/osv-scanner/

dockers:
# Arch: amd64
Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- id: osv-scanner
name: osv-scanner
description: Vulnerability scanner written in Go which uses the data provided by https://osv.dev
entry: osv-scanner
always_run: true
pass_filenames: false
language: golang
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# v1.4.3:

### Features
- [Feature #621](https://github.com/google/osv-scanner/pull/621)
Add support for scanning vendored C/C++ files.
- [Feature #581](https://github.com/google/osv-scanner/pull/581)
Scan submodules commit hashes.

### Fixes
- [Bug #626](https://github.com/google/osv-scanner/issues/626)
Fix gitignore matching for root directory
- [Bug #622](https://github.com/google/osv-scanner/issues/622)
Go binary not found should not be an error
- [Bug #588](https://github.com/google/osv-scanner/issues/588)
handle npm/yarn aliased packages
- [Bug #607](https://github.com/google/osv-scanner/pull/607)
fix: remove some extra newlines in sarif report

# v1.4.2:

### Fixes
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:alpine@sha256:926f7f7e1ab8509b4e91d5ec6d5916ebb45155b0c8920291ba9f361d65385806 AS builder
FROM golang:alpine@sha256:70afe55365a265f0762257550bc38440e0d6d6b97020d3f8c85328f00200dd8e AS builder

WORKDIR /src
COPY ./go.mod ./go.sum ./
Expand All @@ -21,7 +21,7 @@ RUN go mod download
COPY ./ ./
RUN go build -o osv-scanner ./cmd/osv-scanner/

FROM alpine:3.18@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978
FROM alpine:3.18@sha256:34871e7290500828b39e22294660bee86d966bc0017544e848dd9a255cdf59e0

RUN apk --no-cache add ca-certificates git && \
git config --global --add safe.directory '*'
Expand Down
4 changes: 2 additions & 2 deletions action.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:alpine@sha256:926f7f7e1ab8509b4e91d5ec6d5916ebb45155b0c8920291ba9f361d65385806
FROM golang:alpine@sha256:70afe55365a265f0762257550bc38440e0d6d6b97020d3f8c85328f00200dd8e

RUN mkdir /src
WORKDIR /src
Expand All @@ -25,7 +25,7 @@ COPY ./ /src/
RUN go build -o osv-scanner ./cmd/osv-scanner/
RUN go build -o osv-reporter ./cmd/osv-reporter/

FROM alpine:3.18@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978
FROM alpine:3.18@sha256:34871e7290500828b39e22294660bee86d966bc0017544e848dd9a255cdf59e0
RUN apk --no-cache add \
ca-certificates \
git \
Expand Down
Loading