From 4d2d60c0ac1dc2a3978033ad1ddf94bc7f496a01 Mon Sep 17 00:00:00 2001 From: Andre Macedo <149069722+amacedoo@users.noreply.github.com> Date: Thu, 26 Sep 2024 16:50:54 +0100 Subject: [PATCH] Fix permissions --- Dockerfile | 11 ++++------- entrypoint.sh | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf2da28..efe982d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,12 @@ #Use AST Base image -FROM checkmarx/ast-cli:2.2.7-snapshot-v2 +FROM checkmarx/dev-tests:latest USER root RUN touch /app/output.log && chown 65532:65532 /app/output.log -#Copy the entrypoint script and properties used for the action -COPY entrypoint.sh /app/entrypoint.sh -COPY cleanup.sh /app/cleanup.sh - -RUN chmod +x /app/entrypoint.sh \ - && chmod +x /app/cleanup.sh +# Copy the entrypoint script and properties used for the action +COPY --chmod=555 entrypoint.sh /app/entrypoint.sh +COPY --chmod=555 cleanup.sh /app/cleanup.sh USER 65532 \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 299d2f5..32045c3 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,8 +1,8 @@ #!/bin/bash output_file=./app/output.log -pwd -ls -la / + +ls -la /app eval "arr=(${ADDITIONAL_PARAMS})" /app/bin/cx scan create --project-name "${PROJECT_NAME}" -s "." --branch "${BRANCH#refs/heads/}" --scan-info-format json --agent "Github Action" "${arr[@]}" | tee -i $output_file exitCode=${PIPESTATUS[0]}