File tree 9 files changed +138
-124
lines changed
9 files changed +138
-124
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,8 +2,11 @@ name: "CodeQL"
2
2
3
3
on :
4
4
push :
5
+ tags :
6
+ - v*
5
7
branches :
6
8
- main
9
+ pull_request :
7
10
8
11
jobs :
9
12
# ------------------------------
Original file line number Diff line number Diff line change @@ -2,10 +2,10 @@ name: Gitleaks
2
2
3
3
on :
4
4
push :
5
- branches :
6
- - " main"
7
5
tags :
8
- - " v*"
6
+ - v*
7
+ branches :
8
+ - main
9
9
pull_request :
10
10
11
11
permissions :
20
20
- uses : actions/checkout@v4
21
21
with :
22
22
fetch-depth : 0
23
+ ref : ${{ github.event.pull_request.head.sha }}
23
24
24
25
- uses : gitleaks/gitleaks-action@v2
25
26
env :
Original file line number Diff line number Diff line change @@ -2,10 +2,10 @@ name: Grype
2
2
3
3
on :
4
4
push :
5
- branches :
6
- - " main"
7
5
tags :
8
- - " v*"
6
+ - v*
7
+ branches :
8
+ - main
9
9
pull_request :
10
10
11
11
jobs :
22
22
23
23
steps :
24
24
- uses : actions/checkout@v4
25
+ with :
26
+ ref : ${{ github.event.pull_request.head.sha }}
25
27
26
28
- uses : anchore/scan-action@v3
27
29
with :
Original file line number Diff line number Diff line change 26
26
runs-on : ubuntu-latest
27
27
steps :
28
28
- uses : actions/checkout@v4
29
+ with :
30
+ ref : ${{ github.event.pull_request.head.sha }}
29
31
30
32
- uses : actions/setup-go@v5
31
33
with :
Original file line number Diff line number Diff line change 19
19
DOCKER_CLI_EXPERIMENTAL : " enabled"
20
20
steps :
21
21
- uses : actions/checkout@v4
22
- with :
23
- fetch-depth : 0
24
22
25
23
- uses : arduino/setup-task@v2
26
24
with :
Original file line number Diff line number Diff line change
1
+ name : Security
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - v*
7
+ branches :
8
+ - main
9
+ pull_request :
10
+
11
+ permissions :
12
+ contents : read
13
+
14
+ jobs :
15
+ # ------------------------------
16
+
17
+ govulncheck :
18
+ runs-on : ubuntu-latest
19
+ steps :
20
+ - uses : actions/checkout@v4
21
+ with :
22
+ ref : ${{ github.event.pull_request.head.sha }}
23
+
24
+ - uses : actions/setup-go@v5
25
+ with :
26
+ go-version-file : go.mod
27
+
28
+ - uses : arduino/setup-task@v2
29
+ with :
30
+ version : 3.x
31
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
32
+
33
+ - name : setup
34
+ run : task setup
35
+
36
+ - name : install govulncheck
37
+ run : go install golang.org/x/vuln/cmd/govulncheck@latest
38
+
39
+ - name : run govulncheck
40
+ run : govulncheck ./...
41
+
42
+ # ------------------------------
43
+
44
+ semgrep :
45
+ runs-on : ubuntu-latest
46
+ container :
47
+ image : returntocorp/semgrep
48
+ steps :
49
+ - uses : actions/checkout@v4
50
+ with :
51
+ ref : ${{ github.event.pull_request.head.sha }}
52
+
53
+ - uses : actions/checkout@v4
54
+ with :
55
+ repository : dgryski/semgrep-go
56
+ path : rules
57
+
58
+ - uses : actions/setup-go@v5
59
+ with :
60
+ go-version-file : go.mod
61
+
62
+ - name : semgrep
63
+ run : semgrep scan --error --enable-nosem -f ./rules .
Original file line number Diff line number Diff line change
1
+ name : Test
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - v*
7
+ branches :
8
+ - main
9
+ pull_request :
10
+
11
+ permissions :
12
+ contents : read
13
+
14
+ jobs :
15
+ test :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ with :
20
+ ref : ${{ github.event.pull_request.head.sha }}
21
+
22
+ - uses : actions/setup-go@v5
23
+ with :
24
+ go-version-file : go.mod
25
+
26
+ - name : setup-tparse
27
+ run : go install github.com/mfridman/tparse@latest
28
+
29
+ - uses : arduino/setup-task@v2
30
+ with :
31
+ version : 3.x
32
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
33
+
34
+ - name : setup
35
+ run : |
36
+ task setup
37
+ task build
38
+
39
+ - name : test
40
+ run : ./scripts/test.sh
41
+
42
+ - name : Upload coverage reports to Codecov
43
+ uses : codecov/codecov-action@v4
44
+ with :
45
+ token : ${{ secrets.CODECOV_TOKEN }}
46
+
47
+ - name : Ensure scm-engine binary work
48
+ run : ./scm-engine -h
49
+
50
+ - name : Test scm-engine against test GitLab project
51
+ run : ./scm-engine evaluate 1
52
+ env :
53
+ SCM_ENGINE_TOKEN : " ${{ secrets.GITLAB_INTEGRATION_TEST_API_TOKEN }}"
54
+ SCM_ENGINE_CONFIG_FILE : " .scm-engine.example.yml"
55
+ GITLAB_PROJECT : " jippi/scm-engine-schema-test"
56
+ GITLAB_BASEURL : https://gitlab.com/
57
+
58
+ - name : Show any diff that may be in the project
59
+ run : git diff
Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ tasks:
20
20
21
21
build :
22
22
desc : Build the binary
23
+ cmds :
24
+ - go build -o scm-engine .
23
25
sources :
24
26
- ./**/*.go
25
27
generates :
26
28
- ./scm-engine
27
- cmds :
28
- - go build -o scm-engine .
29
29
30
30
test :
31
31
desc : Run tests
You can’t perform that action at this time.
0 commit comments