Skip to content

Commit 21a7db1

Browse files
committed
add osv scanner
LiveReview Pre-Commit Check: skipped
1 parent 6d4d51b commit 21a7db1

File tree

9 files changed

+3240
-2534
lines changed

9 files changed

+3240
-2534
lines changed

.github/workflows/osv-scanner.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ on:
1414

1515
jobs:
1616
osv-scan:
17-
if: ${{ vars.ENABLE_SECURITY_WORKFLOWS == 'true' }}
1817
runs-on: ubuntu-latest
1918
permissions:
2019
contents: read
@@ -25,7 +24,7 @@ jobs:
2524
go-version-file: go.mod
2625
- run: go install github.com/google/osv-scanner/v2/cmd/osv-scanner@latest
2726
- run: mkdir -p security_issues
28-
- run: osv-scanner --format json . > security_issues/osv-scanner-ci.json
27+
- run: osv-scanner scan source --recursive --format json --no-call-analysis=go --experimental-exclude=debug --experimental-exclude=scripts --experimental-exclude=tests --experimental-exclude=.livereview_pgdata --experimental-exclude=.lrdata --experimental-exclude=livereview_pgdata --experimental-exclude=lrdata . > security_issues/osv-scanner-ci.json
2928
- uses: actions/upload-artifact@v4
3029
if: always()
3130
with:

Makefile

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,32 @@ security-osv:
189189
exit 1; \
190190
}
191191
@mkdir -p security_issues
192-
@osv-scanner --format json . > security_issues/osv-scanner-latest.json
193-
@echo "Wrote security_issues/osv-scanner-latest.json"
192+
@dated_report="security_issues/osv-scanner-$(shell date +%d-%m-%Y).json"; \
193+
latest_report="security_issues/osv-scanner-latest.json"; \
194+
status=0; \
195+
osv-scanner scan source --recursive --format json --no-call-analysis=go \
196+
--experimental-exclude=debug \
197+
--experimental-exclude=scripts \
198+
--experimental-exclude=tests \
199+
--experimental-exclude=.livereview_pgdata \
200+
--experimental-exclude=.lrdata \
201+
--experimental-exclude=livereview_pgdata \
202+
--experimental-exclude=lrdata \
203+
. > "$$dated_report" || status=$$?; \
204+
if [ $$status -ne 0 ] && [ $$status -ne 1 ]; then \
205+
echo "osv-scanner failed with exit code $$status"; \
206+
exit $$status; \
207+
fi; \
208+
if [ ! -s "$$dated_report" ]; then \
209+
echo "osv-scanner did not produce a report"; \
210+
exit 1; \
211+
fi; \
212+
cp "$$dated_report" "$$latest_report"; \
213+
if [ $$status -eq 1 ]; then \
214+
echo "osv-scanner reported vulnerabilities (exit 1); report still generated."; \
215+
fi; \
216+
echo "Wrote $$dated_report"; \
217+
echo "Updated $$latest_report"
194218

195219
# Run gitleaks and emit a dated CSV artifact under security_issues/.
196220
security-gitleaks:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<img src="./assets/gfx/png/logo-with-text.png" height=80 />
22

3-
<a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" target="_blank" rel="noopener noreferrer"><img alt="gitleaks" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"></a>&nbsp;
3+
<a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" target="_blank" rel="noopener noreferrer"><img alt="gitleaks" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"></a>&nbsp;<a href="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml" target="_blank" rel="noopener noreferrer"><img alt="gitleaks" src="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml/badge.svg"></a>&nbsp;
44

55
# AI Code Review with Teeth.
66

extension/livereview/package-lock.json

Lines changed: 47 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extension/livereview/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,17 @@
140140
"typescript": "^5.9.3",
141141
"@vscode/test-cli": "^0.0.12",
142142
"@vscode/test-electron": "^2.5.2"
143+
},
144+
"overrides": {
145+
"ajv@6": "6.14.0",
146+
"ajv@8": "8.18.0",
147+
"brace-expansion@1": "1.1.12",
148+
"brace-expansion@2": "2.0.2",
149+
"diff": "8.0.3",
150+
"flatted": "3.4.0",
151+
"js-yaml@4": "4.1.1",
152+
"minimatch@3": "3.1.4",
153+
"minimatch@9": "9.0.7",
154+
"serialize-javascript": "7.0.4"
143155
}
144156
}

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/livereview
22

3-
go 1.24.7
3+
go 1.25.8
44

55
require (
66
github.com/knadh/koanf/parsers/toml v0.1.0
@@ -27,7 +27,7 @@ require (
2727
github.com/rs/zerolog v1.34.0
2828
github.com/stretchr/testify v1.11.1
2929
github.com/tmc/langchaingo v0.1.14
30-
golang.org/x/crypto v0.41.0
30+
golang.org/x/crypto v0.45.0
3131
golang.org/x/time v0.11.0
3232
)
3333

@@ -87,11 +87,11 @@ require (
8787
go.opentelemetry.io/otel/metric v1.36.0 // indirect
8888
go.opentelemetry.io/otel/trace v1.36.0 // indirect
8989
go.uber.org/goleak v1.3.0 // indirect
90-
golang.org/x/net v0.43.0 // indirect
90+
golang.org/x/net v0.47.0 // indirect
9191
golang.org/x/oauth2 v0.30.0 // indirect
92-
golang.org/x/sync v0.17.0 // indirect
92+
golang.org/x/sync v0.18.0 // indirect
9393
golang.org/x/sys v0.39.0 // indirect
94-
golang.org/x/text v0.28.0 // indirect
94+
golang.org/x/text v0.31.0 // indirect
9595
google.golang.org/api v0.218.0 // indirect
9696
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect
9797
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,24 +187,24 @@ go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKr
187187
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
188188
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
189189
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
190-
golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
191-
golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
190+
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
191+
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
192192
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 h1:mgKeJMpvi0yx/sU5GsxQ7p6s2wtOnGAHZWCHUM4KGzY=
193193
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546/go.mod h1:j/pmGrbnkbPtQfxEe5D0VQhZC6qKbfKifgD0oM7sR70=
194-
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
195-
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
194+
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
195+
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
196196
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
197197
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
198-
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
199-
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
198+
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
199+
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
200200
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
201201
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
202202
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
203203
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
204204
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
205205
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
206-
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
207-
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
206+
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
207+
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
208208
golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0=
209209
golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
210210
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

0 commit comments

Comments
 (0)