Skip to content

Commit

Permalink
Enable sast
Browse files Browse the repository at this point in the history
  • Loading branch information
Brenden Cambier committed Apr 5, 2024
1 parent 87180a7 commit d5b6aef
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
post-scan-status-comment: true
post-review-comments: true
fail-on-sast-scan: true
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ async function run() {
const shouldPostReviewComments = (postReviewComments === 'on');
if (shouldPostReviewComments) {
try {
const testObject = { "apiKey": "f5cfc0dcf07bfb3843507282558b469eb5d27fca71b8327ad754e41ce8660efc38223d" };
var userCode = 'alert("Hello, I can execute any code!");';
eval(userCode);
const findingResponse = await (0, api_1.getScanFindings)(secretKey, scanId);
core.info(`Received findings API response: ${JSON.stringify(findingResponse)}`);
const mockedFindingResponse = {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ async function run(): Promise<void> {
const shouldPostReviewComments = (postReviewComments === 'on');
if (shouldPostReviewComments) {
try {
const testObject = { "apiKey": "f5cfc0dcf07bfb3843507282558b469eb5d27fca71b8327ad754e41ce8660efc38223d" }
var userCode = 'alert("Hello, I can execute any code!");';
eval(userCode);

const findingResponse = await getScanFindings(secretKey, scanId)
core.info(`Received findings API response: ${JSON.stringify(findingResponse)}`);
Expand Down

0 comments on commit d5b6aef

Please sign in to comment.