Skip to content

Commit 6419a8c

Browse files
authored
Merge pull request #11 from niaid/ghasctl-1736801145
Updating GitHub Code Scanning Workflows
2 parents 014cceb + de653ad commit 6419a8c

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
name: "CodeQL C#"
4+
5+
on:
6+
push:
7+
branches: ["master", "main"]
8+
pull_request:
9+
# The branches below must be a subset of the branches above
10+
branches: ["master", "main"]
11+
schedule:
12+
- cron: "27 4 * * 5"
13+
14+
jobs:
15+
analyze:
16+
name: Analyze
17+
runs-on: ubuntu-latest
18+
permissions:
19+
actions: read
20+
contents: read
21+
security-events: write
22+
packages: read
23+
# required to fetch internal or private CodeQL packs
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
language: ["csharp"]
29+
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
34+
# Initializes the CodeQL tools for scanning.
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v3
37+
with:
38+
languages: ${{ matrix.language }}
39+
queries: security-extended # security-and-quality
40+
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
41+
# If you wish to specify custom queries, you can do so here or in a config file.
42+
# By default, queries listed here will override any specified in a config file.
43+
# Prefix the list here with "+" to use these queries and those in the config file.
44+
45+
# # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
46+
# # If this step fails, then you should remove it and run the build manually (see below)
47+
# - name: Autobuild
48+
# uses: github/codeql-action/autobuild@v3
49+
50+
# ℹ️ Command-line programs to run using the OS shell.
51+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
52+
53+
# If the Autobuild fails above, remove it and uncomment the following three lines.
54+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
55+
56+
# - run: |
57+
# echo "Run, Build Application using script"
58+
# ./location_of_script_within_repo/buildscript.sh
59+
60+
- name: Perform CodeQL Analysis
61+
uses: github/codeql-action/analyze@v3
62+
with:
63+
category: "/language:${{matrix.language}}"
64+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
name: "CodeQL JavaScript/TypeScript"
4+
5+
on:
6+
push:
7+
branches: ["master", "main"]
8+
pull_request:
9+
# The branches below must be a subset of the branches above
10+
branches: ["master", "main"]
11+
schedule:
12+
- cron: "27 4 * * 5"
13+
14+
jobs:
15+
analyze:
16+
name: Analyze
17+
runs-on: ubuntu-latest
18+
permissions:
19+
actions: read
20+
contents: read
21+
security-events: write
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
language: ["javascript"]
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
32+
# Initializes the CodeQL tools for scanning.
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v3
35+
with:
36+
languages: ${{ matrix.language }}
37+
queries: security-extended # security-and-quality
38+
# If you wish to specify custom queries, you can do so here or in a config file.
39+
# By default, queries listed here will override any specified in a config file.
40+
# Prefix the list here with "+" to use these queries and those in the config file.
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@v3
44+
with:
45+
category: "/language:${{matrix.language}}"
46+

0 commit comments

Comments
 (0)