Skip to content

Commit ae4e0e4

Browse files
chore: cx standardization (#276)
<!-- Thanks for contributing to 2ms by offering a pull request. --> Closes # **Proposed Changes** <!-- Please describe the big picture of your changes here. If it fixes a bug or resolves a feature request, be sure to link to that issue. --> **Checklist** - [ ] I covered my changes with tests. - [ ] I Updated the documentation that is affected by my changes: - [ ] Change in the CLI arguments - [ ] Change in the configuration file I submit this contribution under the Apache-2.0 license. --------- Co-authored-by: cx-leonardo-fontes <204389152+cx-leonardo-fontes@users.noreply.github.com>
1 parent b6d76f8 commit ae4e0e4

File tree

5 files changed

+51
-33
lines changed

5 files changed

+51
-33
lines changed

.github/workflows/security.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,6 @@ jobs:
3333
- name: Set up Docker Buildx
3434
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb #v3.3.0
3535

36-
trivy-scanning:
37-
runs-on: ubuntu-latest
38-
steps:
39-
- name: Checkout Source
40-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
41-
42-
- name: Build and load (not push)
43-
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
44-
with:
45-
load: true
46-
context: .
47-
file: ./Dockerfile
48-
platforms: linux/amd64
49-
push: false
50-
tags: checkmarx/2ms:scanme
51-
52-
- name: Run Trivy Scan
53-
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
54-
with:
55-
image-ref: checkmarx/2ms:scanme
56-
vuln-type: os,library
57-
format: table
58-
ignore-unfixed: true
59-
severity: CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN
60-
trivy-config: trivy.yaml
61-
exit-code: '1'
62-
env:
63-
TRIVY_SKIP_DB_UPDATE: true
64-
TRIVY_SKIP_JAVA_DB_UPDATE: true
65-
66-
6736
secret-scanning:
6837
runs-on: ubuntu-latest
6938
steps:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
3737
with:
3838
path: ${{ github.workspace }}/.cache/trivy
39-
key: cache-trivy-${{ steps.date.outputs.date }}
39+
key: cache-trivy-${{ steps.date.outputs.date }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Trivy-scan
2+
on:
3+
push:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- master
8+
schedule:
9+
- cron: '5 6 * * *' # Runs every day at 06:05 UTC
10+
11+
jobs:
12+
trivy-scan:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Source
16+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
17+
18+
- name: Build and load (not push)
19+
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
20+
with:
21+
load: true
22+
context: .
23+
file: ./Dockerfile
24+
platforms: linux/amd64
25+
push: false
26+
tags: checkmarx/2ms:scanme
27+
28+
- name: Run Trivy Scan
29+
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
30+
with:
31+
image-ref: checkmarx/2ms:scanme
32+
vuln-type: os,library
33+
format: table
34+
ignore-unfixed: true
35+
severity: CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN
36+
trivy-config: trivy.yaml
37+
exit-code: '1'
38+
env:
39+
TRIVY_SKIP_DB_UPDATE: true
40+
TRIVY_SKIP_JAVA_DB_UPDATE: true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ COPY . .
2020
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -a -o /app/2ms .
2121

2222
# Runtime image
23-
FROM cgr.dev/chainguard/git@sha256:b0dbd0c3c6a0f44c0522663c3a7f9b47f8e62ed419c88c37199f61308f19829c
23+
FROM cgr.dev/chainguard/git@sha256:fb9f28194b4dda3ea74c68d731238d1f32023849bca04c5652638e8e199fb956
2424

2525
WORKDIR /app
2626

trivy-whitelist.openvex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"@context": "https://openvex.dev/ns",
3+
"@id": "https://openvex.dev/docs/public/vex-2e67563e128250cbcb3e98930df948dd053e43271d70dc50cfa22d57e03fe96f",
4+
"timestamp": "2024-05-08T16:00:16.853479631-06:00",
5+
"version": 1,
6+
"author":"Omer fainshtein",
7+
"statements": [
8+
]
9+
}

0 commit comments

Comments
 (0)