Skip to content

fix(cli): oa check distrusts the lockfile and unknown statuses - #493

Merged
M0Rf30 merged 1 commit into
openartifact:mainfrom
orcamedia:fix/oa-check-hardening
Nov 16, 2026
Merged

M0Rf30 merged 1 commit into
openartifact:mainfrom
orcamedia:fix/oa-check-hardening

Conversation

@orcamedia

Copy link
Copy Markdown
Contributor

A lockfile can be someone else's (a pull request in CI). --fetch built the metadata path from package names unescaped (the server refuses .. segments, so this stayed inside the repository); names are now percent-escaped and non-names not requested. The table replaces control and format characters in names and reasons. A status oa does not know is an error instead of passing as nothing held.

🤖 Generated with Claude Code

A lockfile can be someone else's (a pull request checked in CI), and its
package names went into requests and the terminal as they were:

- --fetch built the metadata path from the name unescaped, so a name such
  as "../../api/v1/users?x=1" sent an authenticated GET to a path of the
  lockfile's choosing. The server refuses ".." segments (hasAmbiguousPath),
  which kept this inside the repository, but the name could still add a
  query or reach another document of it. Names are now percent-escaped, and
  a name that is not a package name of its format (an empty, "." or ".."
  segment, a control character, a "/" the format does not have) is not
  requested and counted as not fetched.
- The table printed names, versions and reasons raw: an escape sequence or
  a carriage return in a name could redraw a line of a CI log. Control and
  format characters (bidirectional overrides included) are replaced. JSON
  output was already escaped.

And a result whose status oa does not know (a newer server) was neither
listed in the summary nor counted for the exit status, so the check passed;
it is now an error.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@M0Rf30
M0Rf30 merged commit c652164 into openartifact:main Nov 16, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants