forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2dc0de8
commit 88bf229
Showing
15 changed files
with
1,003 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: azure-container-image-scan | ||
|
||
on: | ||
push: | ||
pull_request: | ||
# Publish `main` as Docker `latest` image. | ||
branches: | ||
- main | ||
|
||
# Publish `v1.2.3` tags as releases. | ||
tags: | ||
- v* | ||
|
||
|
||
jobs: | ||
build-secure-and-push: | ||
name: Scan cactus-example-carbon-accounting image | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2.4.0 | ||
env: | ||
# (Required) The token to use to make API calls to GitHub. | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- uses: actions/checkout@v1 | ||
- name: Login to DockerHub Registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
|
||
|
||
- name: Build Images from Dockerfile | ||
run: DOCKER_BUILDKIT=1 docker build -f ./examples/carbon-accounting/Dockerfile . -t cactus-example-carbon-accounting | ||
|
||
- uses: Azure/container-scan@v0.1 | ||
name: Scan image for vulnerabilities | ||
id: container-scan | ||
continue-on-error: true | ||
with: | ||
image-name: cactus-example-carbon-accounting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: trivy-container-image-scan | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
|
||
check_trivy_condition: | ||
name: Check Trivy Condition | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
run_trivy_scan: ${{ steps.set_condition_trivy_scan.outputs.run_trivy_scan }} | ||
steps: | ||
- name: Set Trivy Condition for cactus-example-carbon-accounting | ||
id: set_condition_trivy_scan | ||
run: echo "::set-output name=run_trivy_scan::true" # Set your condition for cactus-example-carbon-accounting here | ||
|
||
build: | ||
name: Scan cactus-example-carbon-accounting table image | ||
runs-on: ubuntu-20.04 | ||
needs: | ||
- check_trivy_condition | ||
if: ${{ needs.check_trivy_condition.outputs.run_trivy_scan == 'true' }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Build an image from Dockerfile | ||
run: DOCKER_BUILDKIT=1 docker build . -f ./examples/carbon-accounting/Dockerfile -t cactus-example-carbon-accounting | ||
- name: Run Trivy vulnerability scan for cactus-example-carbon-accounting | ||
uses: aquasecurity/trivy-action@0.11.2 | ||
with: | ||
image-ref: 'cactus-example-carbon-accounting' | ||
format: 'table' | ||
exit-code: '0' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
severity: 'CRITICAL,HIGH' | ||
|
||
build2: | ||
name: Scan cactus-connector-besu json image | ||
runs-on: ubuntu-20.04 | ||
needs: | ||
- check_trivy_condition | ||
if: ${{ needs.check_trivy_condition.outputs.run_trivy_scan == 'false' }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Build an image from Dockerfile | ||
run: | | ||
DOCKER_BUILDKIT=1 docker build ./packages/cactus-plugin-ledger-connector-besu/ -f ./packages/cactus-plugin-ledger-connector-besu/Dockerfile -t cactus-plugin-besu | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@0.11.2 | ||
with: | ||
image-ref: 'cactus-plugin-besu' | ||
format: 'table' | ||
exit-code: '0' | ||
ignore-unfixed: false | ||
vuln-type: 'os,library' | ||
severity: 'CRITICAL,HIGH' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FROM ghcr.io/hyperledger/cactus-cmd-api-server:2022-11-14-6ff6aac | ||
RUN npm install -g yarn@1.22.17 | ||
FROM ghcr.io/hyperledger/cactus-cmd-api-server:2023-12-21-f8f6bcb | ||
RUN npm i -g corepack && corepack enable && corepack prepare yarn@3.6.0 --activate | ||
|
||
ENV NODE_ENV=production | ||
ARG NPM_PKG_VERSION=latest | ||
|
||
RUN yarn add @hyperledger/cactus-plugin-ledger-connector-iroha@${NPM_PKG_VERSION} --production --ignore-engines | ||
RUN yarn add @hyperledger/cactus-plugin-ledger-connector-iroha@${NPM_PKG_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.