-
Notifications
You must be signed in to change notification settings - Fork 6
Add mono-repo filtering example using a workflow matrix #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add mono-repo filtering example using a workflow matrix #1
Conversation
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
| var server = http.createServer(function(req, res) { | ||
| let path = url.parse(req.url, true).query.path; | ||
|
|
||
| fs.readFileSync(path); // NOT OK |
Check failure
Code scanning / CodeQL-project5-javascript
Uncontrolled data used in path expression
|
|
||
| var obj = bla ? something() : path; | ||
|
|
||
| fs.readFileSync(obj.sub); // NOT OK |
Check failure
Code scanning / CodeQL-project5-javascript
Uncontrolled data used in path expression
| if (random()) { | ||
| obj.sub3 = "safe" | ||
| } | ||
| fs.readFileSync(obj.sub3); // NOT OK |
Check failure
Code scanning / CodeQL-project5-javascript
Uncontrolled data used in path expression
| fs.readFileSync(obj.sub3); // NOT OK | ||
|
|
||
| obj.sub4 = | ||
| fs.readFileSync(obj.sub4) ? // NOT OK |
Check failure
Code scanning / CodeQL-project5-javascript
Uncontrolled data used in path expression
|
|
||
| obj.sub4 = | ||
| fs.readFileSync(obj.sub4) ? // NOT OK | ||
| fs.readFileSync(obj.sub4) : // NOT OK |
Check failure
Code scanning / CodeQL-project5-javascript
Uncontrolled data used in path expression
| obj.sub4 = | ||
| fs.readFileSync(obj.sub4) ? // NOT OK | ||
| fs.readFileSync(obj.sub4) : // NOT OK | ||
| fs.readFileSync(obj.sub4); // NOT OK |
Check failure
Code scanning / CodeQL-project5-javascript
Uncontrolled data used in path expression
|
|
||
| var server2 = http.createServer(function(req, res) { | ||
| let path = url.parse(req.url, true).query.path; | ||
| nodefs.readFileSync(path); // NOT OK |
Check failure
Code scanning / CodeQL-project5-javascript
Uncontrolled data used in path expression
|
|
||
| var server3 = http.createServer(function (req, res) { | ||
| let path = url.parse(req.url, true).query.path; | ||
| chownr(path, "someuid", "somegid", function (err) {}); // NOT OK |
Check failure
Code scanning / CodeQL-project5-javascript
Uncontrolled data used in path expression
|
|
||
| const chownr = require("chownr"); | ||
|
|
||
| var server3 = http.createServer(function (req, res) { |
Check notice
Code scanning / CodeQL-project5-javascript
Unused variable, import, function or class
| } | ||
|
|
||
| if (random()) { | ||
| obj.sub3 = "safe" |
Check notice
Code scanning / CodeQL-project5-javascript
Semicolon insertion
|
|
||
| window.addEventListener('message', (ev) => { | ||
| let message = JSON.parse(ev.data); | ||
| window[message.name](message.payload); // NOT OK, but reported by UnsafeDynamicMethodAccess.ql [INCONSISTENCY] |
Check failure
Code scanning / CodeQL-project6-javascript
Unsafe dynamic method access
| window.addEventListener('message', (ev) => { | ||
| let message = JSON.parse(ev.data); | ||
| window[message.name](message.payload); // NOT OK, but reported by UnsafeDynamicMethodAccess.ql [INCONSISTENCY] | ||
| new window[message.name](message.payload); // NOT OK, but reported by UnsafeDynamicMethodAccess.ql [INCONSISTENCY] |
Check failure
Code scanning / CodeQL-project6-javascript
Unsafe dynamic method access
| window[`HTMLElement${message.name}`](message.payload); // OK - concatenation restricts choice of methods | ||
|
|
||
| function f() {} | ||
| f[message.name](message.payload)(); // NOT OK, but reported by UnsafeDynamicMethodAccess.ql [INCONSISTENCY] |
Check failure
Code scanning / CodeQL-project6-javascript
Unsafe dynamic method access
|
|
||
| obj[message.name](message.payload); // NOT OK | ||
|
|
||
| window[ev](ev); // NOT OK, but reported by UnsafeDynamicMethodAccess.ql [INCONSISTENCY] |
Check failure
Code scanning / CodeQL-project6-javascript
Unsafe dynamic method access
| function f() {} | ||
| f[message.name](message.payload)(); // NOT OK, but reported by UnsafeDynamicMethodAccess.ql [INCONSISTENCY] | ||
|
|
||
| obj[message.name](message.payload); // NOT OK |
Check failure
Code scanning / CodeQL-project6-javascript
Unvalidated dynamic method call
|
|
||
| let obj = {}; | ||
|
|
||
| window.addEventListener('message', (ev) => { |
Check warning
Code scanning / CodeQL-project6-javascript
Missing origin verification in `postMessage` handler
|
|
||
| var server2 = http.createServer(function(req, res) { | ||
| let path = url.parse(req.url, true).query.path; | ||
| nodefs.readFileSync(path); // NOT OK |
Check failure
Code scanning / CodeQL-project5-javascript
Uncontrolled data used in path expression
|
|
||
| var server3 = http.createServer(function (req, res) { | ||
| let path = url.parse(req.url, true).query.path; | ||
| chownr(path, "someuid", "somegid", function (err) {}); // NOT OK |
Check failure
Code scanning / CodeQL-project5-javascript
Uncontrolled data used in path expression
| } | ||
|
|
||
| if (random()) { | ||
| obj.sub3 = "safe" |
Check notice
Code scanning / CodeQL-project5-javascript
Semicolon insertion
|
|
||
| const chownr = require("chownr"); | ||
|
|
||
| var server3 = http.createServer(function (req, res) { |
Check notice
Code scanning / CodeQL-project5-javascript
Unused variable, import, function or class
| function f() {} | ||
| f[message.name](message.payload)(); // NOT OK, but reported by UnsafeDynamicMethodAccess.ql [INCONSISTENCY] | ||
|
|
||
| obj[message.name](message.payload); // NOT OK |
Check failure
Code scanning / CodeQL-project6-javascript
Unvalidated dynamic method call
|
|
||
| window.addEventListener('message', (ev) => { | ||
| let message = JSON.parse(ev.data); | ||
| window[message.name](message.payload); // NOT OK, but reported by UnsafeDynamicMethodAccess.ql [INCONSISTENCY] |
Check failure
Code scanning / CodeQL-project6-javascript
Unsafe dynamic method access
| window.addEventListener('message', (ev) => { | ||
| let message = JSON.parse(ev.data); | ||
| window[message.name](message.payload); // NOT OK, but reported by UnsafeDynamicMethodAccess.ql [INCONSISTENCY] | ||
| new window[message.name](message.payload); // NOT OK, but reported by UnsafeDynamicMethodAccess.ql [INCONSISTENCY] |
Check failure
Code scanning / CodeQL-project6-javascript
Unsafe dynamic method access
| window[`HTMLElement${message.name}`](message.payload); // OK - concatenation restricts choice of methods | ||
|
|
||
| function f() {} | ||
| f[message.name](message.payload)(); // NOT OK, but reported by UnsafeDynamicMethodAccess.ql [INCONSISTENCY] |
Check failure
Code scanning / CodeQL-project6-javascript
Unsafe dynamic method access
|
|
||
| obj[message.name](message.payload); // NOT OK | ||
|
|
||
| window[ev](ev); // NOT OK, but reported by UnsafeDynamicMethodAccess.ql [INCONSISTENCY] |
Check failure
Code scanning / CodeQL-project6-javascript
Unsafe dynamic method access
|
|
||
| let obj = {}; | ||
|
|
||
| window.addEventListener('message', (ev) => { |
Check warning
Code scanning / CodeQL-project6-javascript
Missing origin verification in `postMessage` handler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks! One specific change, checkout up to v4, other than that it looks fine and seems to be working
.github/workflows/codeql_mono.yml
Outdated
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you bump that to v4 please?
Co-authored-by: Chad Bentz <[email protected]>
|
I can't merge this PR, since there's a branch protection rule preventing me from merging, due to the deliberate (example) vulnerabilities |
No description provided.