Skip to content

Commit 00ce818

Browse files
authored
Create codeql-monorepo-full.yml
1 parent f155ced commit 00ce818

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This workflow scans all sub projects of a monorepo.
2+
#
3+
# It uses Actions from `advanced-security/monorepo-code-scanning-action`
4+
#
5+
# The specific language and paths covered by each project are passed to the CodeQL analysis, along with a custom analysis workflow if one is provided.
6+
#
7+
# For TypeScript/JavaScript, Python, and Ruby, and when using 'build-mode: none' for Java and C#, you can let the CodeQL Action handle the "build" step,
8+
# and only target the project that is being changed by the PR.
9+
#
10+
# For Kotlin, Swift and C/C++, or when not using 'build-mode: none' for Java and C#, you will need to manually build the project,
11+
# in a way that you can define in the optional custom analysis workflow.
12+
#
13+
# If you want to specifiy custom queries, you can do so in the custom analysis workflow.
14+
#
15+
# You can find an example of what that looks like in this repository at .github/workflows/custom-codeql-analysis.yml
16+
17+
name: "CodeQL monorepo - scheduled"
18+
19+
on:
20+
workflow_dispatch:
21+
schedule:
22+
# every day at midnight, please edit as appropriate
23+
- cron: "0 0 * * *"
24+
25+
jobs:
26+
whole-repo:
27+
runs-on: ubuntu-latest
28+
permissions:
29+
contents: read
30+
outputs:
31+
projects: ${{ steps.whole-repo.outputs.projects }}
32+
steps:
33+
- name: Scan whole repo, split up by project
34+
id: whole-repo
35+
uses: advanced-security/monorepo-code-scanning-action/whole-repo@main
36+
with:
37+
projects-json: monorepo-projects.json
38+
39+
scan:
40+
runs-on: ubuntu-latest
41+
permissions:
42+
contents: read
43+
actions: read
44+
security-events: write
45+
needs: whole-repo
46+
strategy:
47+
matrix:
48+
project: ${{ fromJson(needs.whole-repo.outputs.projects).projects }}
49+
steps:
50+
- name: Analyze code
51+
uses: advanced-security/monorepo-code-scanning-action/scan@main

0 commit comments

Comments
 (0)