-
Notifications
You must be signed in to change notification settings - Fork 62
92 lines (87 loc) · 2.99 KB
/
codeql.yaml
File metadata and controls
92 lines (87 loc) · 2.99 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Copyright 2025 Chainguard, Inc.
# SPDX-License-Identifier: Apache-2.0
name: "CodeQL Advanced"
on:
pull_request:
push:
branches: ["main"]
schedule:
- cron: "35 23 * * 0"
env:
CODEQL_EXTRACTOR_GO_BUILD_TRACING: "on"
permissions: {}
jobs:
analyze:
if: ${{ github.repository }} == 'chainguard-dev/malcontent'
runs-on: mal-ubuntu-latest-8-core
permissions:
actions: read
contents: read
packages: read
security-events: write
steps:
- uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Checkout virusTotal/yara-x
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
fetch-tags: true
repository: virusTotal/yara-x
path: yara-x
ref: refs/tags/v1.5.0
- name: Install Rust for yara-x-capi
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
with:
toolchain: stable
- name: Install cargo-c and yara-x-capi
run: |
cd ${{ github.workspace }}/yara-x
cargo install cargo-c --locked
sudo -E env "PATH=$PATH" cargo cinstall -p yara-x-capi --features=native-code-serialization --release
sudo ldconfig -v
cd ${{ github.workspace }}
sudo rm -rf ${{ github.workspace }}/yara-x
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: "go.mod"
check-latest: true
cache: false
- name: Initialize CodeQL
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.5
with:
languages: go
build-mode: manual
- run: |
go build -o /dev/null ./...
go test -o /dev/null -c ./...
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.5
with:
category: "/language:go"
analyze-actions:
if: ${{ github.repository }} == 'chainguard-dev/malcontent'
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
packages: read
security-events: write
steps:
- uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Initialize CodeQL
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.5
with:
languages: actions
build-mode: none
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.5
with:
category: "/language:actions"