Skip to content

Commit f946d41

Browse files
committed
Add a CodeQL workflow
Copy the CodeQL workflow from cisagov/skeleton-python-library to provide CodeQL scanning for Ansible projects.
1 parent ed71fc6 commit f946d41

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
# For most projects, this workflow file will not need changing; you simply need
3+
# to commit it to your repository.
4+
#
5+
# You may wish to alter this file to override the set of languages analyzed,
6+
# or to provide custom queries or build logic.
7+
name: "CodeQL"
8+
9+
on:
10+
push:
11+
# Dependabot triggered push events have read-only access, but uploading code
12+
# scanning requires write access.
13+
branches-ignore:
14+
- dependabot/**
15+
pull_request:
16+
# The branches below must be a subset of the branches above
17+
branches:
18+
- develop
19+
schedule:
20+
- cron: '0 14 * * 6'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze
25+
runs-on: ubuntu-latest
26+
permissions:
27+
# required for all workflows
28+
security-events: write
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
# Override automatic language detection by changing the below list
33+
# Supported options are go, javascript, csharp, python, cpp, and java
34+
language:
35+
- python
36+
# Learn more...
37+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v3
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v2
46+
with:
47+
languages: ${{ matrix.language }}
48+
49+
# Autobuild attempts to build any compiled languages (C/C++, C#, or
50+
# Java). If this step fails, then you should remove it and run the build
51+
# manually (see below).
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v2
54+
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
57+
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following
59+
# three lines and modify them (or add more) to build your code if your
60+
# project uses a compiled language
61+
62+
# - run: |
63+
# make bootstrap
64+
# make release
65+
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v2

0 commit comments

Comments
 (0)