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]}