Skip to content

Commit 1fa954a

Browse files
steviemulGithub
andauthored
SCAN-5857 : Update to look for new vulns only on non default branch. (#10)
* SCAN-5857 : Update to look for new vulns only on non default branch. * SCAN-5857 : Use local scanner version 1.1.7. * SCAN-5857 : Use latest packages. * [Auto] Image tag updated latest pushed version --------- Co-authored-by: Github <[email protected]>
1 parent 506dedd commit 1fa954a

File tree

11 files changed

+3696
-7789
lines changed

11 files changed

+3696
-7789
lines changed

.eslintrc.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/actions/build-image/action.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ runs:
4949
git config --global user.name 'Github'
5050
git config --global user.email '[email protected]'
5151
52+
git pull
53+
5254
yq e ".runs.image = env(IMAGE_TAG)" -i action.yml
55+
5356
git add action.yml
5457
git diff-index --quiet HEAD || (git commit -m "[Auto] Image tag updated latest pushed version" && git push)

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM alpine:3.19
1+
FROM alpine:3.21.3
22

33
RUN apk upgrade && \
4-
apk add nodejs npm openjdk11-jre-headless tar
4+
apk add nodejs npm openjdk11-jre-headless tar zstd
55

66
COPY package.json /contrast-local-scanner/package.json
77
RUN cd /contrast-local-scanner && npm i --production

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This GitHub action lets you use Contrast Local Scanner to detect vulnerabilities
44

55
## Local Scan Engine
66

7-
The github action uses Contrast local scan engine version 1.1.6.
7+
The github action uses Contrast local scan engine version 1.1.7.
88

99
Release notes for the local scan engine can be viewed here [Scan Release Notes](https://docs.contrastsecurity.com/en/scan-release-notes-and-archive.html)
1010

action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ inputs:
4040
memory:
4141
description: Memory setting passed to the underlying scan engine. Defaulted to 8g
4242
required: false
43+
new:
44+
description: Set this to true or false to only fail the action on new vulnerabilities. This defaults to true when on a non default branch.
45+
required: false
4346
path:
4447
description: Path to scan with local scanner. Defaults to the current repository path.
4548
required: false
@@ -71,4 +74,4 @@ inputs:
7174
default: ${{ github.token }}
7275
runs:
7376
using: 'docker'
74-
image: 'docker://ghcr.io/contrast-security-oss/contrast-local-scan-action:sha-ac9a938bf17b9f140d7fb3b52d9d21619cec40e6'
77+
image: 'docker://ghcr.io/contrast-security-oss/contrast-local-scan-action:sha-350bfa17e35bc1f0e4432a0fe1ba344e0ed5f5a8'

eslint.config.mjs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { defineConfig } from "eslint/config";
2+
import globals from "globals";
3+
import path from "node:path";
4+
import { fileURLToPath } from "node:url";
5+
import js from "@eslint/js";
6+
import { FlatCompat } from "@eslint/eslintrc";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
export default defineConfig([{
17+
extends: compat.extends("eslint:recommended", "prettier"),
18+
19+
languageOptions: {
20+
globals: {
21+
...globals.node,
22+
},
23+
24+
ecmaVersion: "latest",
25+
sourceType: "module",
26+
},
27+
rules: {
28+
"no-unused-vars": "off",
29+
}
30+
}]);

0 commit comments

Comments
 (0)