Skip to content

feat: add firewall-wrapped pkgmgr commands for npm, pip, maven, and dotnet - #66

Merged
sawka-harness merged 1 commit into
mainfrom
Feat/har-pkg-mgr
Jul 30, 2026
Merged

feat: add firewall-wrapped pkgmgr commands for npm, pip, maven, and dotnet#66
sawka-harness merged 1 commit into
mainfrom
Feat/har-pkg-mgr

Conversation

@BlueLabelscotch

Copy link
Copy Markdown
Collaborator

Summary

Adds five execute artifact:* commands that wrap native package manager
commands with Harness firewall protection: npm_install, npm_ci,
pip_install, mvn_install, dotnet_restore.

Each wrapper runs the native tool as-is. On a 403/forbidden failure, it
resolves the full dependency graph (including transitive deps) and submits
it for bulk Harness firewall evaluation, printing BLOCKED/WARN/ALLOWED
results.

What's included

  • pkgmgr_orchestrator.go — shared flow: detect registry → resolve UUID →
    run native command → on 403, resolve deps + firewall evaluation.
  • pkgmgr_client.go + one file per client (npm/pip/maven/nuget).
  • configure_*.go — each now persists registry info to
    ~/.harness/<client>-pkgmgr.json for the wrappers to read.

Bug fixes bundled in

  • configure_maven.go: replaced mirrorOf: "*" with an additive
    <repositories>/<pluginRepositories> profile — the mirror was
    intercepting Maven's own core plugin lookups too, breaking
    mvn install on every registry tested.
  • configure_npm.go: fixed .npmrc duplicating registry=/
    always-auth lines on repeated configure registry runs.

Testing

  • mvn install and execute artifact:mvn_install validated end-to-end
    against two live registries (hosted + upstream-proxy).
  • .npmrc dedup fix verified across repeated runs.

…otnet

Wraps native install/restore commands with 403 detection and bulk firewall
evaluation of the full dependency graph. Also fixes configure_maven's
mirrorOf:"*" breaking core plugin resolution, and a .npmrc duplication bug.
@sawka-harness
sawka-harness merged commit 72903f4 into main Jul 30, 2026
1 check 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