-
Notifications
You must be signed in to change notification settings - Fork 22
75 lines (75 loc) · 1.97 KB
/
lint.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
name: "Lint"
on: # yamllint disable-line rule:truthy
push:
branches:
- "!dependabot/*"
- "main"
pull_request:
branches: ["*"]
merge_group:
types:
- "checks_requested"
jobs:
go-lint:
name: "Lint Go"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "authzed/actions/setup-go@main"
- name: "Lint Go"
run: "go run magefile.go lint:go"
- name: "Go Mod Tidy"
uses: "chainguard-dev/actions/nodiff@main"
with:
path: ""
fixup-command: "go run magefile.go deps:tidy"
protobuf:
name: "Generate Protobufs"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "authzed/actions/setup-go@main"
- uses: "chainguard-dev/actions/nodiff@main"
with:
path: ""
fixup-command: "go run magefile.go gen:proto"
extra-lint:
name: "Lint YAML"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "authzed/actions/setup-go@main"
- name: "Lint Go"
run: "go run magefile.go lint:extra"
codeql:
name: "Analyze with CodeQL"
runs-on: "ubuntu-latest"
permissions:
actions: "read"
contents: "read"
security-events: "write"
strategy:
fail-fast: false
matrix:
language: ["go"]
steps:
- uses: "actions/checkout@v4"
- uses: "authzed/actions/codeql@main"
trivy:
name: "Analyze with Trivy"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- name: "Run Trivy vulnerability scanner"
uses: "aquasecurity/trivy-action@master"
with:
scan-type: "fs"
ignore-unfixed: true
format: "sarif"
output: "trivy-results.sarif"
severity: "CRITICAL"
- name: "Upload Trivy scan results to GitHub Security tab"
uses: "github/codeql-action/upload-sarif@v3"
with:
sarif_file: "trivy-results.sarif"