Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

Commit ebf2655

Browse files
gregthenryguan
authored andcommitted
add GCP example, format input descriptions consistently in action.yml
1 parent e8e39fa commit ebf2655

2 files changed

Lines changed: 24 additions & 10 deletions

File tree

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Scan your containers with [Deep Security Smart Check](https://www.trendmicro.com/smartcheck).
66

7-
This tool is used by the Deep Security Smart Check plugin for [Jenkins](https://plugins.jenkins.io/deepsecurity-smartcheck/) and can also be used as a [GitHub Action](https://github.com/features/actions).
7+
This project was built by the [Deep Security Smart Check](trendmicro.com/smartcheck) team to help you to scan your containers in your CI/CD pipeline, you can use as a standalone Docker container published in the [Dockerhub](https://hub.docker.com/r/deepsecurity/smartcheck-scan-action) to scan your images. This tool is also used by the [Deep Security Smart Check plugin for Jenkins](https://plugins.jenkins.io/deepsecurity-smartcheck/) and the GitHub Action, that wraps the container published in Dockerhub.
88

99
## Requirements
1010

@@ -21,8 +21,8 @@ Smart Check.
2121
uses: deepsecurity/Deep-Security-Smart-Check@version*
2222
with:
2323
# Mandatory
24-
DSSC_IMAGE_NAME: myorg/myimage
25-
DSSC_SMARTCHECK_HOST: myorg.com
24+
DSSC_IMAGE_NAME: registryhost/myimage
25+
DSSC_SMARTCHECK_HOST: smartcheck.example.com
2626
DSSC_SMARTCHECK_USER: admin
2727
DSSC_SMARTCHECK_PASSWORD: 12345
2828
DSSC_IMAGE_PULL_AUTH: {"username":"<user>","password":"<password>"}
@@ -31,7 +31,7 @@ Smart Check.
3131
DSSC_INSECURE_SKIP_TLS_VERIFY: true
3232
DSSC_INSECURE_SKIP_REGISTRY_TLS_VERIFY: true
3333
DSSC_PREREGISTRY_SCAN: false
34-
DSSC_PREREGISTRY_HOST: myorg.com
34+
DSSC_PREREGISTRY_HOST: pre-registryhost.com
3535
DSSC_PREREGISTRY_USER: admin
3636
DSSC_PREREGISTRY_PASSWORD: 12345
3737
DSSC_RESULTS_FILE: /results.json
@@ -71,7 +71,7 @@ be given with `DSSC_IMAGE_NAME`.
7171
- If you're using AWS, you can use this example below:
7272

7373
```json
74-
'{"aws":{"region":"us-east-1","accessKeyID":"'$AWS_ACCESS_KEY_ID'","secretAccessKey":"'$AWS_SECRET_ACCESS_KEY'"}}'
74+
'{"aws":{"region":"us-east-1","accessKeyID":"$AWS_ACCESS_KEY_ID","secretAccessKey":"$AWS_SECRET_ACCESS_KEY"}}'
7575
```
7676
**PS.: ALWAYS use secrets to expose your credentials!**
7777

@@ -186,7 +186,7 @@ jobs:
186186
DSSC_SMARTCHECK_HOST: ${{ secrets.DSSC_SMARTCHECK_HOST }}
187187
DSSC_SMARTCHECK_USER: ${{ secrets.DSSC_SMARTCHECK_USER }}
188188
DSSC_SMARTCHECK_PASSWORD: ${{ secrets.DSSC_SMARTCHECK_PASSWORD }}
189-
DSSC_IMAGE_PULL_AUTH: ${{ secrets.DSSC_IMAGE_PULL_AUTH }}
189+
DSSC_IMAGE_PULL_AUTH: '{"aws":{"region":"us-east-1","accessKeyID":"$AWS_ACCESS_KEY_ID","secretAccessKey":"$AWS_SECRET_ACCESS_KEY"}}'
190190
DSSC_FINDINGS_THRESHOLD: '{"malware": 999, "vulnerabilities": { "defcon1": 999, "critical": 999, "high": 999 }, "contents": { "defcon1": 999, "critical": 999, "high": 999 }, "checklists": { "defcon1": 999, "critical": 999, "high": 999 }}'
191191
DSSC_INSECURE_SKIP_TLS_VERIFY: true
192192
DSSC_INSECURE_SKIP_REGISTRY_TLS_VERIFY: true
@@ -203,8 +203,22 @@ jobs:
203203
DSSC_FINDINGS_THRESHOLD: '{"malware": 999, "vulnerabilities": { "defcon1": 999, "critical": 999, "high": 999 }, "contents": { "defcon1": 999, "critical": 999, "high": 999 }, "checklists": { "defcon1": 999, "critical": 999, "high": 999 }}'
204204
DSSC_INSECURE_SKIP_TLS_VERIFY: true
205205
DSSC_INSECURE_SKIP_REGISTRY_TLS_VERIFY: true
206+
207+
- name: Cloud One Container Security Scan GCR
208+
uses: felipecosta09/Deep-Security-Smart-Check-Scan-Action@version*
209+
with:
210+
DSSC_IMAGE_NAME: region.gcr.io/projectname/myimage
211+
DSSC_SMARTCHECK_HOST: ${{ secrets.DSSC_SMARTCHECK_HOST }}
212+
DSSC_SMARTCHECK_USER: ${{ secrets.DSSC_SMARTCHECK_USER }}
213+
DSSC_SMARTCHECK_PASSWORD: ${{ secrets.DSSC_SMARTCHECK_PASSWORD }}
214+
DSSC_IMAGE_PULL_AUTH: '{"username": "oauth2accesstoken", "password": "${{ secrets.GCP_TOKEN }}"}'
215+
DSSC_FINDINGS_THRESHOLD: '{"malware": 999, "vulnerabilities": { "defcon1": 999, "critical": 999, "high": 999 }, "contents": { "defcon1": 999, "critical": 999, "high": 999 }, "checklists": { "defcon1": 999, "critical": 999, "high": 999 }}'
216+
DSSC_INSECURE_SKIP_TLS_VERIFY: true
217+
DSSC_INSECURE_SKIP_REGISTRY_TLS_VERIFY: true
206218
```
207219

220+
**PS.: For GCP users, you'll need to setup your authentication using an Access token and assigning the right permissions, more details here: https://cloud.google.com/container-registry/docs/advanced-authentication#token**
221+
208222
## Example Workflow Running a Docker Container
209223

210224
```yml
@@ -221,7 +235,7 @@ jobs:
221235
steps:
222236
- name: Deep Security Smart Check
223237
run: |
224-
docker run -v /var/run/docker.sock:/var/run/docker.sock deepsecurity/smartcheck-scan-action --image-name MYREGISTRY/MYIMAGE --smartcheck-host=DSSC_URL --smartcheck-user=DSSC_USER --smartcheck-password=DSSC_PASSSWORD --insecure-skip-tls-verify --insecure-skip-registry-tls-verify --image-pull-auth='{"aws":{"region":"us-east-1","accessKeyID":"'$AWS_ACCESS_KEY_ID'","secretAccessKey":"'$AWS_SECRET_ACCESS_KEY'"}}' --findings-threshold '{"malware": 100, "vulnerabilities": { "defcon1": 100, "critical": 100, "high": 100 }, "contents": { "defcon1": 100, "critical": 100, "high": 100 }, "checklists": { "defcon1": 100, "critical": 100, "high": 100 }}'
238+
docker run deepsecurity/smartcheck-scan-action --image-name registryhost/myimage --smartcheck-host=smartcheck.example.com --smartcheck-user=admin --smartcheck-password=12345 --image-pull-auth='{"username":"<user>","password":"<password>"}'
225239
```
226240

227241
## Pre-registry scanning

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: "Deep Security Smart Check"
22
description: "Scan container images with Deep Security Smart Check."
33
inputs:
44
DSSC_IMAGE_NAME:
5-
description: "Container repository, eg myorg/myimage."
5+
description: "(MANDATORY) Container repository, eg registryhost/myimage."
66
required: true
77
DSSC_SMARTCHECK_HOST:
8-
description: "Deep Security Smart Check url, eg mydomain.com."
8+
description: "(MANDATORY) Deep Security Smart Check url, eg smartcheck.example.com"
99
required: true
1010
DSSC_SMARTCHECK_USER:
11-
description: "Deep Security Smart Check username, eg admin."
11+
description: "(MANDATORY) Deep Security Smart Check username, eg admin."
1212
required: true
1313
DSSC_SMARTCHECK_PASSWORD:
1414
description: (MANDATORY) Deep Security Smart Check password, eg 12345.

0 commit comments

Comments
 (0)