Skip to content

v0.8.0

Choose a tag to compare

@sunilmehta-si sunilmehta-si released this 30 Oct 11:14
· 51 commits to main since this release

v0.8.0

Go is now reviewed as fully as Python: the SQL, shell, TLS, open-redirect and path-traversal rules cover Go's
standard library and its common web and database packages, and three Go-specific rules join them. Every rule here
was run over llm-d, Argo CD, KServe, Kubeflow Pipelines, MLflow and etcd-operator before shipping; the false positives
that turned up (an HTTP client's Get read as SQL, TLS turned off in tests, a umask-masked mode) are fixed.

Added

  • ACR-APP-024: Go servers started with http.ListenAndServe or an http.Server with no ReadHeaderTimeout, open
    to Slowloris. Argo CD has eleven, Tesla's vehicle-command HTTP proxy two.
  • ACR-APP-025: files and directories created world-writable (0777, 0666) in Python and Go.
  • ACR-APP-026: an authorisation or identity check written as a Python assert, which -O removes.
  • ACR-GHA-018 (high): an action whose owner is one edit, or one swapped pair of letters, from a well-known one
    (action/checkout, actoins/setup-python, dockr/login-action).
  • ACR-K8S-021 (low): containers without allowPrivilegeEscalation: false or capabilities.drop: [ALL], the two
    restricted-profile settings every container needs.
  • ACR-DOCKER-012: pip, npm -g and go install of packages with no version in a Dockerfile, one finding per
    RUN. Argo CD's and Kubeflow's build images install several tools at @latest.
  • ACR-APP-022: tarfile and zipfile extraction with no filter= and no member-path check, the zip-slip shape of
    model and dataset downloads. Run over MLflow, KServe and Kubeflow Pipelines before shipping: four real
    extractions, no false positives left.
  • ACR-APP-023: temporary files created by a fixed name under /tmp (tempfile.mktemp, a literal joined onto the
    temp directory, open("/tmp/x", "w"), Go's filepath.Join(os.TempDir(), "x")), open to a symlink race. Over Argo CD it found the dex
    command writing its TLS key and config to fixed paths under /tmp, and MLflow's REPL cache under /tmp/repl_tmp_data.
  • ACR-DEP-005: pip requirements installed from a git branch, tag or bare URL instead of a commit.

Changed

  • ACR-APP-010 (predictable random numbers for a secret) covers Go's math/rand, in files that do not import
    crypto/rand.
  • ACR-APP-001, -002, -005, -012 and -013 cover Go: statements built with fmt.Sprintf or + for
    database/sql, sqlx, pgx and GORM; exec.Command("sh", "-c", ...) with a built command; InsecureSkipVerify: true
    and grpc.WithInsecure(); http.Redirect and Gin redirects to request values; file calls and path joins fed by
    request values, route variables or form fields.
  • ACR-APP-005 skips test files, where verification is turned off against the test's own self-signed server.

Fixed

  • ACR-K8S-005 no longer reports image: ${VAR} or $(VAR) placeholders as unpinned. The image is filled in at
    deploy time, often from a file of digests, so the pin is not in the manifest; the Compose rule already skipped them.