Skip to content

Block publishing of Semaphore TS/JS packages if their deps contain security alerts #922

@jacque006

Description

@jacque006

Describe the improvement you're thinking about

Modify https://github.com/semaphore-protocol/semaphore/blob/main/scripts/publish.ts or add prepublish script(s) to fail if npm audit (yarn npm audit) returns security vulnerabilities that are >= High..

Many of these issues are likely not relevant (only apply to servers, only specific components, etc.), but it would:

  • Increase confidence of package consumers during installs/updates
  • Prevent adding/updating of deps with known vulnerabilities

It would NOT:

  • Prevent Semaphore packages with discovered dep vulnerabilities post-publish. npm-deprecate could be useful here, as well as Dependabot (below).

Describe alternatives you've considered

  • Leave as is, accept the risk.
  • Rely on depandabot

Questions

  • If one package has alerts but others do not, should all the publishes fail (atomic) or only those with alerts?
  • Should there be the ability to override the alert blocking publishing, say if a critical fix needs to go out? Is there a need to suppress specific alerts?
    • Can always comment out this check in the publish script/package JSON.

Additional context

#920 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    devops 🔧Operations management and dev tools

    Type

    No type

    Projects

    Status

    ♻️ Grooming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions