Skip to content

Commit 8014e3e

Browse files
committed
additional cleanup
1 parent 6b554a9 commit 8014e3e

7 files changed

Lines changed: 10 additions & 107 deletions

File tree

.github/actions/run-semgrep/run-semgrep.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ function getPrBaseBranch(owner, repo, branch, token) {
3636
} else {
3737
resolve(null);
3838
}
39-
} catch (e) {
39+
} catch (_e) {
4040
resolve(null);
4141
}
4242
});
4343
});
44-
req.on('error', err => {
44+
req.on('error', _err => {
4545
resolve(null);
4646
});
4747
req.end();

.github/actions/run-semgrep/run-semgrep.unit.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ describe('getSemgrepMetrics', () => {
263263
it('correctly parses semgrep JSON output', () => {
264264
const fakeInputFileName = 'fake-results.json';
265265

266-
jest.spyOn(fs, 'readFileSync').mockImplementation(fileName => {
266+
jest.spyOn(fs, 'readFileSync').mockImplementation((fileName, _encoding) => {
267267
if (fileName === fakeInputFileName) {
268268
return JSON.stringify(exampleSemgrepOutput);
269269
}
@@ -282,7 +282,7 @@ describe('getSemgrepMetrics', () => {
282282
it('handles empty results', () => {
283283
const fakeInputFileName = 'fake-results.json';
284284

285-
jest.spyOn(fs, 'readFileSync').mockImplementation(fileName => {
285+
jest.spyOn(fs, 'readFileSync').mockImplementation((fileName, _encoding) => {
286286
if (fileName === fakeInputFileName) {
287287
return JSON.stringify(emptySemgrepOutput);
288288
}

.github/workflows/CHANGELOGS/run_semgrep_scan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ All notable changes to the **run_semgrep_scan** callable workflow are documented
66

77
### Changed
88

9-
- Updated workflow to support cross-repository usage by checking out the core-github-actions repository into a subdirectory and referencing all internal actions and scripts from that subdirectory. This ensures that required actions and scripts are always available, regardless of which repository invokes the workflow.
9+
- Updated workflow to support cross-repository usage by repo qualifying the internal composite action calls.
1010

1111
## 1.0.0
1212

.github/workflows/run_semgrep_scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
normalized_baseline: ${{ steps.semgrep.outputs.normalizedBaseline }}
138138

139139
steps:
140-
- name: Checkout Calling Repo
140+
- name: Checkout code
141141
uses: actions/checkout@v4
142142
with:
143143
ref: ${{ inputs.commit_identifier }}
@@ -170,8 +170,8 @@ jobs:
170170
fi
171171
172172
- name: Run Semgrep
173-
id: semgrep
174173
uses: OpenSesame/core-github-actions/.github/actions/run-semgrep@actions/run-semgrep/1.0.0
174+
id: semgrep
175175
env:
176176
INPUT_BASELINE: ${{ inputs.baseline_ref }}
177177
HAS_PR: ${{ steps.pr_check.outputs.pr_exists }}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@
4343

4444
// Optional: Spell checker
4545
"cSpell.enabled": true,
46-
"cSpell.words": ["nosemgrep", "opensesame", "reviewdog", "semgrep", "upserting"]
46+
"cSpell.words": ["nosemgrep", "nvmrc", "opensesame", "reviewdog", "semgrep", "upserting"]
4747
}

package-lock.json

Lines changed: 0 additions & 94 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,9 @@
2727
"audit": "npm audit --audit-level=high --omit=dev",
2828
"lint:check": "eslint *.js --ext .js,.json",
2929
"lint:fix": "eslint *.js --ext .js,.json --fix",
30-
"format:check": "prettier --check './*.js' './*.mjs' './*.json' './*.md' 'scripts/**/*.js' '.github/actions/**/*.yml' '.github/actions/**/*.md' '.github/actions/**/*.js'",
31-
"format:fix": "prettier --write './*.js' './*.mjs' './*.json' './*.md' 'scripts/**/*.js' '.github/actions/**/*.yml' '.github/actions/**/*.md' '.github/actions/**/*.js'",
30+
"format:check": "prettier --check './*.js' './*.mjs' './*.json' './*.md' 'scripts/**/*.js' '.github/actions/**/*.*'",
31+
"format:fix": "prettier --write './*.js' './*.mjs' './*.json' './*.md' 'scripts/**/*.js' '.github/actions/**/*.*'",
3232
"scan": "semgrep --config=p/ci --config=p/security-audit --config=p/javascript ./*.js ./*.mjs ./*.json scripts/ .github/actions/",
3333
"check": "npm run audit && npm run test && npm run lint:check && npm run format:check && npm run scan"
34-
},
35-
"dependencies": {
36-
"node-fetch": "3.3.2"
3734
}
3835
}

0 commit comments

Comments
 (0)