Skip to content

Commit 73a9d53

Browse files
authored
CI: Add CodeQL workflow for GitHub Actions security scanning (#1408)
* CI: Add CodeQL workflow for GitHub Actions security scanning * Update .github/workflows/codeql.yml
1 parent 5be412b commit 73a9d53

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
#
18+
19+
name: "CodeQL"
20+
21+
on:
22+
push:
23+
branches: [ "main" ]
24+
pull_request:
25+
branches: [ "main" ]
26+
schedule:
27+
- cron: '16 4 * * 1'
28+
29+
permissions:
30+
contents: read
31+
32+
jobs:
33+
analyze:
34+
name: Analyze Actions
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: read
38+
security-events: write
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
43+
with:
44+
persist-credentials: false
45+
46+
- name: Initialize CodeQL
47+
uses: github/codeql-action/init@c793b717bc78562f491db7b0e93a3a178b099162 # v4
48+
with:
49+
languages: actions
50+
51+
- name: Perform CodeQL Analysis
52+
uses: github/codeql-action/analyze@c793b717bc78562f491db7b0e93a3a178b099162 # v4
53+
with:
54+
category: "/language:actions"

0 commit comments

Comments
 (0)