From 657341f483dad3afa5cd8b3d4e80b0c2b7744c29 Mon Sep 17 00:00:00 2001 From: Kedasha Kerr Date: Tue, 26 Apr 2022 10:21:17 -0500 Subject: [PATCH 1/8] update dockerfile --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4028e5..a0d4551 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,13 @@ jobs: - name: Check out the repo uses: actions/checkout@v2 + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: lacework-community + password: ${{ secrets.GITHUB_TOKEN }} + - name: Pull Docker image run: docker pull ghcr.io/lacework-community/inline-scanner-with-github-actions:latest From f0147309267fcc532a584fe171977c3ec73b92b2 Mon Sep 17 00:00:00 2001 From: Kedasha Kerr Date: Tue, 26 Apr 2022 11:24:37 -0500 Subject: [PATCH 2/8] update dockerfile --- .github/workflows/ci.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0d4551..5d199ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,15 +6,18 @@ on: [push] jobs: publish-hello-world-image: runs-on: ubuntu-latest + permissions: + packages: write steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: registry: ghcr.io - username: lacework-community + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build the hello-world Docker image @@ -27,26 +30,19 @@ jobs: test-inline-scanner: runs-on: ubuntu-latest steps: - - name: Check out the repo + - name: Checkout uses: actions/checkout@v2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 with: - registry: ghcr.io - username: lacework-community - password: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Pull Docker image run: docker pull ghcr.io/lacework-community/inline-scanner-with-github-actions:latest - - name: lw-scanner + - name: Scan the image uses: lacework/lw-scanner-action@v0.7.1 with: LW_ACCOUNT_NAME: ${{ secrets.LW_ACCOUNT_NAME }} LW_ACCESS_TOKEN: ${{ secrets.LW_ACCESS_TOKEN }} IMAGE_NAME: ghcr.io/lacework-community/inline-scanner-with-github-actions IMAGE_TAG: latest - SAVE_BUILD_REPORT: true - BUILD_REPORT_FILE_NAME: report.html - FAIL_BUILD: false + From 72c1de9372c925c6a38466c62921233d630e84e0 Mon Sep 17 00:00:00 2001 From: Kedasha Kerr Date: Tue, 26 Apr 2022 11:25:40 -0500 Subject: [PATCH 3/8] update dockerfile --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d199ae..42f7f46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2 - name: Login to GitHub Container Registry uses: docker/login-action@v1 From d0d9c64ba1529d6edb1fbdaa9fa35a0909cfaadb Mon Sep 17 00:00:00 2001 From: Kedasha Kerr Date: Tue, 26 Apr 2022 11:27:19 -0500 Subject: [PATCH 4/8] update dockerfile --- .github/workflows/ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42f7f46..be72e6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,12 +6,9 @@ on: [push] jobs: publish-hello-world-image: runs-on: ubuntu-latest - permissions: - packages: write steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - name: Login to GitHub Container Registry uses: docker/login-action@v1 @@ -45,4 +42,3 @@ jobs: LW_ACCESS_TOKEN: ${{ secrets.LW_ACCESS_TOKEN }} IMAGE_NAME: ghcr.io/lacework-community/inline-scanner-with-github-actions IMAGE_TAG: latest - From 99a0e98881ef7ddc9bee1f929c7fc65d66905ad8 Mon Sep 17 00:00:00 2001 From: Kedasha Kerr Date: Tue, 26 Apr 2022 11:29:20 -0500 Subject: [PATCH 5/8] update dockerfile --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be72e6c..b076c61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -#publish your docker image to github container registry +#publish the docker image to github container registry name: publish image and scan on: [push] From f5b50b70d42704c9d4ecd95101183aa0a045c13e Mon Sep 17 00:00:00 2001 From: Kedasha Kerr Date: Tue, 26 Apr 2022 11:41:13 -0500 Subject: [PATCH 6/8] update dockerfile --- .github/workflows/ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b076c61..0cb46d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,16 +29,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Pull Docker image - run: docker pull ghcr.io/lacework-community/inline-scanner-with-github-actions:latest - + run: docker pull docker pull ghcr.io/ladykerr/gh-action-demo:latest - name: Scan the image uses: lacework/lw-scanner-action@v0.7.1 with: LW_ACCOUNT_NAME: ${{ secrets.LW_ACCOUNT_NAME }} LW_ACCESS_TOKEN: ${{ secrets.LW_ACCESS_TOKEN }} - IMAGE_NAME: ghcr.io/lacework-community/inline-scanner-with-github-actions + IMAGE_NAME: docker pull ghcr.io/ladykerr/gh-action-demo IMAGE_TAG: latest From a44a92743b6a7735f5786f433d164d6ae915644b Mon Sep 17 00:00:00 2001 From: Kedasha Kerr Date: Tue, 26 Apr 2022 11:42:34 -0500 Subject: [PATCH 7/8] update image package to scan --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cb46d8..84f89df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: uses: actions/checkout@v2 - name: Pull Docker image - run: docker pull docker pull ghcr.io/ladykerr/gh-action-demo:latest + run: docker pull ghcr.io/ladykerr/gh-action-demo:latest - name: Scan the image uses: lacework/lw-scanner-action@v0.7.1 with: From 9b67c8b15562effb4b4a505f0514006dcd6c09a7 Mon Sep 17 00:00:00 2001 From: Kedasha Kerr Date: Tue, 26 Apr 2022 11:45:03 -0500 Subject: [PATCH 8/8] update image package to scan --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84f89df..fcd2b81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,3 +39,6 @@ jobs: LW_ACCESS_TOKEN: ${{ secrets.LW_ACCESS_TOKEN }} IMAGE_NAME: docker pull ghcr.io/ladykerr/gh-action-demo IMAGE_TAG: latest + SAVE_BUILD_REPORT: true + BUILD_REPORT_FILE_NAME: report.html + FAIL_BUILD: false