Skip to content

Commit 69bb4a1

Browse files
authored
Merge pull request kubearmor#1623 from kubearmor/add-codeql-sast
Add CodeQL for SAST
2 parents 1165f1f + bfafcf3 commit 69bb4a1

14 files changed

+103
-5
lines changed

.github/workflows/ci-latest-helm-chart-release.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
paths:
88
- "deployments/helm/**"
99

10+
# Declare default permissions as read only.
11+
permissions: read-all
12+
1013
jobs:
1114
publish-chart:
1215
name: Update Stable Helm Chart With Latest Changes

.github/workflows/ci-latest-release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ on:
1616
branches:
1717
- "v*"
1818

19+
# Declare default permissions as read only.
20+
permissions: read-all
21+
1922
jobs:
2023
check:
2124
name: Check what pkg were updated

.github/workflows/ci-operator-release.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ on:
1414
branches:
1515
- "v*"
1616

17+
# Declare default permissions as read only.
18+
permissions: read-all
1719

1820
env:
1921
PLATFORM: linux/amd64,linux/arm64/v8

.github/workflows/ci-stable-release.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ on:
55
branches: [main]
66
paths:
77
- "STABLE-RELEASE"
8-
# - ".github/workflows/ci-stable-release.yml"
8+
9+
# Declare default permissions as read only.
10+
permissions: read-all
911

1012
jobs:
1113
push-stable-version:

.github/workflows/ci-systemd-release.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
tags:
66
- "*"
77

8-
permissions:
9-
contents: write
8+
# Declare default permissions as read only.
9+
permissions: read-all
1010

1111
jobs:
1212
goreleaser:
@@ -33,6 +33,8 @@ jobs:
3333

3434
- name: Run GoReleaser
3535
uses: goreleaser/goreleaser-action@v2
36+
permissions:
37+
contents: write
3638
with:
3739
distribution: goreleaser
3840
version: v1.12.2

.github/workflows/ci-test-controllers.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- "pkg/**"
99
- ".github/workflows/ci-test-controllers.yml"
1010

11+
# Declare default permissions as read only.
12+
permissions: read-all
13+
1114
jobs:
1215
kubearmor-controller-test:
1316
name: Build and Test KubeArmorController Using Ginkgo
@@ -43,7 +46,7 @@ jobs:
4346
run: |
4447
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
4548
make -C tests/k8s_env/
46-
timeout-minutes: 20
49+
timeout-minutes: 30
4750

4851
- name: Get karmor sysdump
4952
if: ${{ failure() }}

.github/workflows/ci-test-ginkgo.yml

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
- ".github/workflows/ci-test-ginkgo.yml"
2020
- "pkg/KubeArmorOperator/**"
2121
- "deployments/helm/**"
22+
23+
# Declare default permissions as read only.
24+
permissions: read-all
25+
2226
jobs:
2327
build:
2428
name: Auto-testing Framework / ${{ matrix.os }} / ${{ matrix.runtime }}

.github/workflows/ci-test-go.yml

+15
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,23 @@ name: ci-test-go
33
on:
44
push:
55
branches: [main]
6+
paths:
7+
- "KubeArmor/**"
8+
- "tests/**"
9+
- "protobuf/**"
10+
- ".github/workflows/ci-test-go.yml"
11+
- "pkg/KubeArmorOperator/**"
612
pull_request:
713
branches: [main]
14+
paths:
15+
- "KubeArmor/**"
16+
- "tests/**"
17+
- "protobuf/**"
18+
- ".github/workflows/ci-test-go.yml"
19+
- "pkg/KubeArmorOperator/**"
20+
21+
# Declare default permissions as read only.
22+
permissions: read-all
823

924
jobs:
1025
go-fmt:

.github/workflows/ci-test-helm-charts.yml

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
- "deployments/helm/**"
1313
- ".github/workflows/ci-test-helm-charts.yml"
1414

15+
# Declare default permissions as read only.
16+
permissions: read-all
17+
1518
jobs:
1619
lint:
1720
name: Helm Chart Tests / ubuntu 20.04

.github/workflows/ci-test-operator.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
- "deployments/**"
1818
- "KubeArmor/utils/**"
1919

20+
# Declare default permissions as read only.
21+
permissions: read-all
22+
2023
jobs:
2124
kubearmor-operator-test:
2225
name: Build KubeArmor Operator

.github/workflows/ci-test-systemd.yml

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ on:
1616
- "protobuf/**"
1717
- ".github/workflows/ci-test-systemd.yml"
1818

19+
# Declare default permissions as read only.
20+
permissions: read-all
21+
1922
jobs:
2023
build:
2124
name: Test KubeArmor in Systemd Mode

.github/workflows/ci-test-ubi-image.yml

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ on:
1616
- "protobuf/**"
1717
- ".github/workflows/ci-test-ginkgo.yml"
1818

19+
# Declare default permissions as read only.
20+
permissions: read-all
21+
1922
jobs:
2023
build:
2124
name: Auto-testing Framework / ${{ matrix.os }} / ${{ matrix.runtime }}

.github/workflows/codeql.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
branches: [ "main" ]
19+
schedule:
20+
- cron: '30 17 * * 5'
21+
22+
# Declare default permissions as read only.
23+
permissions: read-all
24+
25+
jobs:
26+
analyze:
27+
name: Analyze
28+
runs-on: 'ubuntu-latest'
29+
timeout-minutes: 30
30+
permissions:
31+
# required for all workflows
32+
security-events: write
33+
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@v4
37+
38+
# Initializes the CodeQL tools for scanning.
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v3
41+
with:
42+
languages: 'go'
43+
44+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
45+
# If this step fails, then you should remove it and run the build manually (see below)
46+
- name: Autobuild
47+
uses: github/codeql-action/autobuild@v3
48+
49+
- name: Perform CodeQL Analysis
50+
uses: github/codeql-action/analyze@v3
51+
with:
52+
category: "/language:go"

KubeArmor/BPF/libbpf

Submodule libbpf updated 117 files

0 commit comments

Comments
 (0)