Skip to content

Commit 1b6c8da

Browse files
committed
Merge branch 'master' into apitester-inject-queries-730514506246798316
2 parents 469aff0 + e5a139f commit 1b6c8da

255 files changed

Lines changed: 22771 additions & 4157 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Dependency Update Review Plan - google/osv.dev
2+
3+
This document outlines the workflow for reviewing and managing dependency update Pull Requests in the `google/osv.dev` repository.
4+
5+
## 1. Discovery & Triage
6+
Identify all open dependency updates.
7+
- **Action**: Use `gh pr list` to fetch PRs with the `dependencies` label.
8+
- **Criteria**: Filter for `state:open`.
9+
10+
## 2. Analysis & Review
11+
Execute the analysis process using the deterministic Python script: `tools/review_dependency_prs.py`. Perform the following checks:
12+
- **CI/CD Status**: Analyze structured JSON output from `gh pr view <pr> --json statusCheckRollup` to reliably identify pending or failing checks (ignoring `SUCCESS`, `SKIPPED`, and `NEUTRAL`).
13+
- **Change Scope**: Use `gh pr diff --name-only` to ensure modifications are restricted to expected files:
14+
- Dependency manifests (`go.mod`, `poetry.lock`, `package.json`, etc.)
15+
- Submodule updates
16+
- Dockerfile and Terraform version updates
17+
- GitHub Actions workflow updates (`.github/workflows/`)
18+
- **Version Analysis**: Inspect the PR's branch name (e.g., looking for `renovate/major-...`) and PR title to identify major semantic version jumps.
19+
20+
## 3. Reporting
21+
Run the `tools/review_dependency_prs.py` script to generate a final summary report categorized into:
22+
- ✅ **Ready for Submission**: Patch or Minor updates with passing CI and standard file changes.
23+
- ⚠️ **Manual Review Required**:
24+
- Major version upgrades (high risk of breaking changes).
25+
- PRs with failing or pending CI checks.
26+
- PRs modifying files outside the standard dependency manifests.
27+
28+
## 4. Final Review
29+
Present the final summary report to the user. Do not execute any approval or merge commands (e.g., `approve_dependency_prs.sh`, `gh pr review`, or `gh pr merge`). The user will use the provided report to manually trigger any necessary scripts or actions.
30+
31+
## 5. Notable Observations & Learnings
32+
Consider the following during the review process:
33+
- **API Snapshot Tests**: Monitor the `PR-api-snapshot-tests` workflow, as it is highly sensitive to transitive dependency changes. Manual review is required if it fails to ensure output formats haven't regressed.
34+
- **Go API Clients**: Expect frequent updates to `google.golang.org/api` across multiple services (vulnfeeds, indexer, tools).
35+
- **Renovate Branch Patterns**: Use Renovate branch names (e.g., `renovate/major-docs`) as a reliable heuristic for identifying major version jumps.

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
# Initializes the CodeQL tools for scanning.
4545
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
46+
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
4747
with:
4848
languages: ${{ matrix.language }}
4949
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -54,7 +54,7 @@ jobs:
5454
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5555
# If this step fails, then you should remove it and run the build manually (see below)
5656
- name: Autobuild
57-
uses: github/codeql-action/autobuild@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
57+
uses: github/codeql-action/autobuild@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
5858

5959
# ℹ️ Command-line programs to run using the OS shell.
6060
# 📚 https://git.io/JvXDl
@@ -68,4 +68,4 @@ jobs:
6868
# make release
6969

7070
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
71+
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1

‎.github/workflows/generate-protos.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ jobs:
3838
python-version: '3.13'
3939

4040
- name: Install poetry
41-
run: pip install poetry==2.2.1
41+
run: pip install poetry==2.3.3
4242

4343
- name: Set up poetry
4444
run: |
4545
poetry install
4646
cd gcp/api && poetry install
4747
4848
- name: Set up Go
49-
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
49+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
5050
with:
51-
go-version: '1.26.1'
51+
go-version: '1.26.2'
5252

5353
- name: Install protoc
5454
run: |
@@ -65,7 +65,7 @@ jobs:
6565
run: make build-protos
6666

6767
- name: Create Pull Request
68-
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
68+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
6969
with:
7070
token: ${{ secrets.PR_TOKEN_BOT }}
7171
title: "chore: regenerate protos"

‎.github/workflows/lint.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ jobs:
4646
with:
4747
python-version: '3.13'
4848
- name: Install poetry
49-
run: pip install poetry==2.2.1
49+
run: pip install poetry==2.3.3
5050
- name: Set up poetry
5151
run: poetry install
5252
- name: Set up Go
53-
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
53+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
5454
with:
55-
go-version: '>=1.26.1'
55+
go-version: '>=1.26.2'
5656
- name: Set up terraform
5757
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
5858
- name: Run pylint and yapf, go vet

‎.github/workflows/publish-to-pypi.yaml‎

Lines changed: 0 additions & 50 deletions
This file was deleted.

‎.github/workflows/scorecards.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ jobs:
4242

4343
# Upload the results as artifacts (optional).
4444
- name: "Upload artifact"
45-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
45+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
4646
with:
4747
name: SARIF file
4848
path: results.sarif
4949
retention-days: 5
5050

5151
# Upload the results to GitHub's code scanning dashboard.
5252
- name: "Upload to code-scanning"
53-
uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
53+
uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
5454
with:
5555
sarif_file: results.sarif

‎.github/workflows/snapshots.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2525
with:
2626
persist-credentials: false
27-
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
27+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2828
with:
2929
go-version: stable
3030
check-latest: true
@@ -33,7 +33,7 @@ jobs:
3333
env:
3434
OSV_API_BASE_URL: api.test.osv.dev
3535
UPDATE_SNAPS: always
36-
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
36+
- uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
3737
with:
3838
token: ${{ secrets.PR_TOKEN_BOT }}
3939
title: "test: update apitester snapshots"

‎.github/workflows/zizmor.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
persist-credentials: false
2121

2222
- name: Run zizmor 🌈
23-
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
23+
uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3

‎CONTRIBUTING.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ You must install:
4848
1. [Pylint](https://pypi.org/project/pylint)
4949
1. [Yapf](https://github.com/google/yapf)
5050
1. [Make](https://www.gnu.org/software/make/)
51-
1. [Poetry](https://python-poetry.org/) >= 2.2.1
51+
1. [Poetry](https://python-poetry.org/) >= 2.3.3
5252
2. [Google Cloud SDK](https://cloud.google.com/sdk)
5353
3. [Hugo](https://gohugo.io/installation/)
5454
4. [Node JS](https://nodejs.org/) >= 18.17.x
@@ -97,6 +97,16 @@ By default, this skips long tests, enable them by setting the `LONG_TESTS` varia
9797
LONG_TESTS=1 make api-server-tests
9898
```
9999

100+
There are additional tests for testing coarse version ordering logic for ecosystem version
101+
parsers. These are tested against the entire OSV database.
102+
```shell
103+
# in go/
104+
# you must generate the list of all versions by running
105+
./osv/ecosystem/testdata/regen_coarse_test_data.sh
106+
# then run the tests
107+
RUN_COARSE_LARGE_TEST=1 go test ./osv/ecosystem -run TestCoarseMonotonicityLarge
108+
```
109+
100110
##### Test result generation
101111

102112
Many tests are written using a

‎Makefile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ importer-tests:
2828
recoverer-tests:
2929
cd gcp/workers/recoverer && ./run_tests.sh
3030

31+
vanir-signatures-tests:
32+
cd gcp/workers/vanir_signatures && ./run_tests.sh
33+
3134
website-tests:
3235
cd gcp/website && ./run_tests.sh
3336

@@ -52,7 +55,7 @@ update-api-snapshots:
5255
cd gcp/api && UPDATE_SNAPS=true ./run_tests_e2e.sh $(HOME)/.config/gcloud/application_default_credentials.json
5356

5457
lint:
55-
GOTOOLCHAIN=go1.26.1 $(run-cmd) tools/lint_and_format.sh
58+
GOTOOLCHAIN=go1.26.2 $(run-cmd) tools/lint_and_format.sh
5659

5760
build-osv-protos:
5861
cd osv && $(run-cmd) python -m grpc_tools.protoc --python_out=. --mypy_out=. --proto_path=. --proto_path=osv-schema/proto vulnerability.proto importfinding.proto

0 commit comments

Comments
 (0)