Skip to content

Commit

Permalink
fix: kill trivy
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbasado committed May 13, 2024
1 parent d691df1 commit 032e6ee
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 49 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/deploy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
run: |
docker build -t ${{ steps.login-ecr.outputs.registry }}${{ env.IMAGE_NAME }} .
docker push ${{ steps.login-ecr.outputs.registry }}${{ env.IMAGE_NAME }}
- name: Trigger Trivy
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GH_TOKEN }}
event-type: new-image
client-payload: '{"image_ref": "${{ steps.login-ecr.outputs.registry }}${{ env.IMAGE_NAME }}"}'
# - name: Trigger Trivy
# uses: peter-evans/repository-dispatch@v2
# with:
# token: ${{ secrets.GH_TOKEN }}
# event-type: new-image
# client-payload: '{"image_ref": "${{ steps.login-ecr.outputs.registry }}${{ env.IMAGE_NAME }}"}'

validate_manifest:
name: Run Manifest Validation
Expand Down
56 changes: 28 additions & 28 deletions .github/workflows/trivy_scan.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: Trivy Scan
on:
repository_dispatch:
types: [new-image]
jobs:
myEvent:
runs-on: ubuntu-latest
steps:
- name: Checkout Service
uses: actions/checkout@main
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: '${{ github.event.client_payload.image_ref }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
# name: Trivy Scan
# on:
# repository_dispatch:
# types: [new-image]
# jobs:
# myEvent:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Service
# uses: actions/checkout@main
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: us-west-1
# - name: Login to Amazon ECR
# id: login-ecr
# uses: aws-actions/amazon-ecr-login@v1
# - name: Run Trivy vulnerability scanner
# uses: aquasecurity/trivy-action@master
# with:
# image-ref: '${{ github.event.client_payload.image_ref }}'
# format: 'table'
# exit-code: '1'
# ignore-unfixed: true
# vuln-type: 'os,library'
# severity: 'CRITICAL,HIGH'
30 changes: 15 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ FROM python:3.9

WORKDIR /boost

RUN apt-get remove libexpat1 libexpat1-dev -y
RUN apt-get remove libsasl2-2 libsasl2-modules-db -y
RUN apt-get remove linux-libc-dev -y
RUN apt-get remove libssl-dev -y
RUN apt-get remove libtiff5 libtiffxx5 -y
# RUN apt-get remove libexpat1 libexpat1-dev -y
# RUN apt-get remove libsasl2-2 libsasl2-modules-db -y
# RUN apt-get remove linux-libc-dev -y
# RUN apt-get remove libssl-dev -y
# RUN apt-get remove libtiff5 libtiffxx5 -y
RUN apt-get update -y
RUN apt-get install libssl-dev>=1.1.1k-1+deb11u2 libssl1.1>=1.1.1k-1+deb11u2 openssl>=1.1.1k-1+deb11u2 -y
RUN apt-get install libexpat1>=2.2.10-2+deb11u1 -y
RUN apt-get install libsasl2-2>=2.1.27+dfsg-2.1+deb11u1 -y
RUN apt-get install linux-libc-dev>=5.10.92-2 libc6-dev -y
RUN apt-get install libtiff5>=4.2.0-1+deb11u1 -y
RUN apt-get install zlib1g>=1:1.2.11.dfsg-2+deb11u1 -y
RUN apt-get install libgnutls30>=3.7.1-5+deb11u2
RUN apt-get install libtirpc-common>=1.3.1-1+deb11u1 -y
RUN apt-get install libtirpc-dev>=1.3.1-1+deb11u1 -y
RUN apt-get install libtirpc3>=1.3.1-1+deb11u1 -y
# RUN apt-get install libssl-dev>=1.1.1k-1+deb11u2 libssl1.1>=1.1.1k-1+deb11u2 openssl>=1.1.1k-1+deb11u2 -y
# RUN apt-get install libexpat1>=2.2.10-2+deb11u1 -y
# RUN apt-get install libsasl2-2>=2.1.27+dfsg-2.1+deb11u1 -y
# RUN apt-get install linux-libc-dev>=5.10.92-2 libc6-dev -y
# RUN apt-get install libtiff5>=4.2.0-1+deb11u1 -y
# RUN apt-get install zlib1g>=1:1.2.11.dfsg-2+deb11u1 -y
# RUN apt-get install libgnutls30>=3.7.1-5+deb11u2
# RUN apt-get install libtirpc-common>=1.3.1-1+deb11u1 -y
# RUN apt-get install libtirpc-dev>=1.3.1-1+deb11u1 -y
# RUN apt-get install libtirpc3>=1.3.1-1+deb11u1 -y
COPY requirements.txt .
RUN pip install -r requirements.txt

Expand Down

0 comments on commit 032e6ee

Please sign in to comment.