Skip to content

snyk/actions/setup seems flakey, errors with No URLs found in -. #43

@rtyley

Description

@rtyley

The Synk Github Action we use in many of our repos seems flakey? https://github.com/guardian/play-secret-rotation/actions/workflows/snyk.yml has failed spuriously twice in the past 24 hours:

image

The error occurs in the Run snyk/actions/setup step, which is configured in this repo here:

security:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
- uses: snyk/actions/setup@0.3.0

The error on an unsuccessful run is:

Installing the latest version of Snyk on Linux
No URLs found in -.
sha256sum: snyk-linux.sha256: No such file or directory
Error: Process completed with exit code 1.

A successful run would differ at the No URLs found in -. line, and say:

Installing the latest version of Snyk on Linux
--2023-01-12 10:40:47--  https://github.com/snyk/cli/releases/download/v1.10[8](https://github.com/guardian/play-secret-rotation/actions/runs/3901451722/jobs/6663316114#step:3:10)5.0/snyk-linux
Resolving github.com (github.com)... 140.82.112.3
Connecting to github.com (github.com)|140.82.112.3|:443... connected.
HTTP request sent, awaiting response... 302 Found

The workaround is to re-run the job - it will normally pass on the 2nd try.

Cause

The first line that's obviously failing is the first wget in setup_snyk.sh. We see the error message No URLs found in -., and that's an error message generated by wget:

  /* And then from the input file, if any.  */
  if (opt.input_filename)
    {
      int count;
      int status;
      status = retrieve_from_file (opt.input_filename, opt.force_html, &count);
      inform_exit_status (status);
      if (!count)
        logprintf (LOG_NOTQUIET, _("No URLs found in %s.\n"),
                   opt.input_filename);
    }

The wget is trying to do this:

wget --progress=bar:force:noscroll "$BASE_URL/$VERSION/snyk-${PREFIX}"

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