Skip to content

Commit 0f5d8d3

Browse files
authored
Merge branch 'main' into jsjoeio-update-vscode-164
2 parents 8e628d5 + 643ef13 commit 0f5d8d3

File tree

3 files changed

+74
-1
lines changed

3 files changed

+74
-1
lines changed

.github/workflows/ci.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,6 @@ jobs:
465465
- name: Checkout code
466466
uses: actions/checkout@v3
467467
- name: Run Trivy vulnerability scanner in repo mode
468-
#Commit SHA for v0.0.17
469468
uses: aquasecurity/trivy-action@296212627a1e693efa09c00adc3e03b2ba8edf18
470469
with:
471470
scan-type: "fs"

.github/workflows/trivy-docker.yaml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Trivy Nightly Docker Scan
2+
3+
on:
4+
# Run scans if the workflow is modified, in order to test the
5+
# workflow itself. This results in some spurious notifications,
6+
# but seems okay for testing.
7+
pull_request:
8+
branches:
9+
- main
10+
paths:
11+
- .github/workflows/trivy-docker.yaml
12+
13+
# Run scans against master whenever changes are merged.
14+
push:
15+
branches:
16+
- main
17+
paths:
18+
- .github/workflows/trivy-docker.yaml
19+
20+
schedule:
21+
# Run at 10:15 am UTC (3:15am PT/5:15am CT)
22+
# Run at 0 minutes 0 hours of every day.
23+
- cron: "15 10 * * *"
24+
25+
workflow_dispatch:
26+
27+
permissions:
28+
actions: none
29+
checks: none
30+
contents: read
31+
deployments: none
32+
issues: none
33+
packages: none
34+
pull-requests: none
35+
repository-projects: none
36+
security-events: none
37+
statuses: none
38+
39+
# Cancel in-progress runs for pull requests when developers push
40+
# additional changes, and serialize builds in branches.
41+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
42+
concurrency:
43+
group: ${{ github.workflow }}-${{ github.ref }}
44+
45+
jobs:
46+
trivy-scan-image:
47+
runs-on: ubuntu-20.04
48+
49+
steps:
50+
- name: Checkout code
51+
uses: actions/checkout@v3
52+
53+
- name: Run Trivy vulnerability scanner in image mode
54+
uses: aquasecurity/trivy-action@296212627a1e693efa09c00adc3e03b2ba8edf18
55+
with:
56+
image-ref: "docker.io/codercom/code-server:latest"
57+
ignore-unfixed: true
58+
format: "sarif"
59+
output: "trivy-image-results.sarif"
60+
severity: "HIGH,CRITICAL"
61+
62+
- name: Upload Trivy scan results to GitHub Security tab
63+
uses: github/codeql-action/upload-sarif@v1
64+
with:
65+
sarif_file: "trivy-image-results.sarif"

test/unit/node/cli.test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,15 @@ describe("parser", () => {
194194
expect(logger.level).toEqual(Level.Trace)
195195
})
196196

197+
it("should set valid log level env var", async () => {
198+
process.env.LOG_LEVEL = "error"
199+
const defaults = await setDefaults(parse([]))
200+
expect(defaults).toEqual({
201+
...defaults,
202+
log: "error",
203+
})
204+
})
205+
197206
it("should ignore invalid log level env var", async () => {
198207
process.env.LOG_LEVEL = "bogus"
199208
const defaults = await setDefaults(parse([]))

0 commit comments

Comments
 (0)