Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Commit

Permalink
added checkov action, skip statements (#270)
Browse files Browse the repository at this point in the history
* added checkov action, skip statements

* Updated checkov run directory

* moved checkov skip statements

* Move checkov skip statements for remaining dockerfiles

Co-authored-by: Siva Mullapudi <sivamu@microsoft.com>
  • Loading branch information
Nsikan Udoyen and sivamu committed Jul 21, 2022
1 parent 409c012 commit a924056
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ FROM ghcr.io/cse-labs/k3d:latest

# some images require specific values
ARG USERNAME=vscode
#checkov:skip=CKV_DOCKER_2: No healthcheck is needed
#checkov:skip=CKV_DOCKER_3: No user is needed
#checkov:skip=CKV_DOCKER_7: Alright to use "latest" tag

# [Optional] Uncomment this section to install additional OS packages.
# alternatively, you can add commands to on-create.sh and/or post-create.sh
Expand All @@ -12,5 +15,5 @@ ARG USERNAME=vscode
# RUN apt-get -y install --no-install-recommends <your-package-list-here>

# upgrade packages
# you can improve startup time by runing in post-create.sh
# you can improve startup time by running in post-create.sh
# RUN apt upgrade -
4 changes: 4 additions & 0 deletions .devcontainer/cosmos-emulator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator as base-cosmos
#checkov:skip=CKV_DOCKER_2: No healthcheck is needed
#checkov:skip=CKV_DOCKER_3: No user is needed
#checkov:skip=CKV_DOCKER_7: Alright to use "latest" tag
#checkov:skip=CKV_DOCKER_9: APT runs with -y option

WORKDIR /usr/local/bin/cosmos/

Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/checkov-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Checkov Docker Vulnerability Scan

on:
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Checkov on Dockerfiles
id: checkov
uses: bridgecrewio/checkov-action@master
with:
directory: .
framework: dockerfile
quiet: true
output_format: github_failed_only
soft_fail: false
4 changes: 3 additions & 1 deletion src/LodeRunner.API/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
### Build and Test the App
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build

#checkov:skip=CKV_DOCKER_2: No healthcheck is needed

### copy the source and tests
COPY ./LodeRunner.sln /src/
COPY ./LodeRunner /src/LodeRunner
Expand Down Expand Up @@ -39,4 +41,4 @@ USER ngsa
### copy the app
COPY --from=build /app .

ENTRYPOINT [ "dotnet", "LodeRunner.API.dll" ]
ENTRYPOINT [ "dotnet", "LodeRunner.API.dll" ]
4 changes: 4 additions & 0 deletions src/LodeRunner.UI/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
### build prod app
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:14 AS build

#checkov:skip=CKV_DOCKER_2: No healthcheck is needed
#checkov:skip=CKV_DOCKER_3: No user is needed

ENV NODE_ENV production
WORKDIR /app

Expand Down
2 changes: 2 additions & 0 deletions src/LodeRunner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
### build the app
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build

#checkov:skip=CKV_DOCKER_2: No healthcheck is needed

# Copy the source
COPY ./LodeRunner.sln /src/
COPY ./LodeRunner /src/LodeRunner
Expand Down

0 comments on commit a924056

Please sign in to comment.