Skip to content

downloadToFile caches HTTP error responses. AccessDenied XML saved as install.sh on persistent runners #119

Description

@andrewmc201

On persistent self-hosted runners, the /tmp/ directory is persistent between runs. Coupled with an error that was returned on the first execution, cimon-action subsequently fails all further runs for two reasons:

First, downloadToFile does not check the HTTP response status code before writing to disk. If the S3 URL returns a non-200 response (e.g. 403 AccessDenied), the error body is written verbatim to /tmp/install.sh.

Second, The cache guard checks only for file existence, not file integrity. On subsequent runs, existsSync('/tmp/install.sh') returns true for the corrupt file and the re-download is permanently skipped.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions