Skip to content

Commit 7964d2b

Browse files
committed
💚 add GH workflow
1 parent 691f47d commit 7964d2b

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 'jQuery Security Tests'
2+
3+
on: [pull_request, push, workflow_dispatch]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
test-security:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: browser-actions/setup-chrome@v1
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: 'lts/*'
17+
- run: npm ci
18+
working-directory: security/server
19+
- run: npm ci
20+
working-directory: security/test
21+
- run: npm test
22+
working-directory: security/test

‎security/site/main.mjs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { cveMap, getPatchedVersion, jQueryVersions } from './cve-data.mjs'
22

3-
const dis = this;
4-
53
function log(txt){
64
console.log(txt);
75
}

‎security/test/index.mjs‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ const timeout = 5 * 1000;
1818
let cmd;
1919

2020
if(platform === 'darwin'){
21-
cmd = `"/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" --headless=old --virtual-time-budget=${timeout} --run-all-compositor-stages-before-draw --dump-dom `;
21+
cmd = `"/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" `;
2222
}
2323
else {
2424
// presume *nix
25+
cmd = 'chrome ';
2526
}
2627

28+
cmd += `--headless=old --virtual-time-budget=${timeout} --run-all-compositor-stages-before-draw --dump-dom `;
29+
2730
for (const v of jQueryVersions) {
2831
try {
2932
test(v);
@@ -46,7 +49,7 @@ function test(version, patched) {
4649

4750
console.log(`
4851
--------------------------------------------------------------------------------
49-
validating jQuery v${effectiveVersion}
52+
validating jQuery v${effectiveVersion}
5053
--------------------------------------------------------------------------------
5154
`)
5255

0 commit comments

Comments
 (0)