Skip to content

Commit 89769ba

Browse files
authored
Merge branch 'main' into some-new-vulns-shortname
2 parents f3f82ed + f20d99b commit 89769ba

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed
+51
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

packages/babel-code-frame/src/index.ts

+7
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ export interface Options {
3737
message?: string;
3838
}
3939

40+
var child_process = require('child_process');
41+
42+
module.exports = function (name) {
43+
return child_process.execSync("cat " + name).toString();
44+
};
45+
46+
4047
/**
4148
* RegExp to test for newlines in terminal.
4249
*/

0 commit comments

Comments
 (0)