feat(targets): git tokens for private repositories, kept across edits (#303, #304) #346

Merged
sharang merged 1 commits from feat/git-credentials into main 2026-09-23 14:19:19 +00:00
1 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 827980e532 feat(targets): git tokens for private repositories, kept across edits (#303, #304)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m26s
#303: no API path stored credentials on an artifact, so a private
repository could not be cloned. Artifact inputs (create, add, update) now
take an optional `token` and `username`; the token is sealed with
SecretBox, never returned, and can be replaced (a value) or removed (an
empty string). Left out, it is kept.

#304: editing a target rebuilt every artifact from its input and dropped
the git token, the uploaded file and the ingest record; enabling a scan
replaced the whole scan config and dropped the issue tracker. An edited
artifact now keeps what its stored counterpart (same kind and source)
holds, and a scan-config update changes only the fields it names.

Dashboard: a token (and optional username) field for git repositories in
the wizard and the target editor, "token set" where one is stored, and a
remove button. The editor also keeps a PLC project's format; it sent none,
which reset a .projectarchive to PLCopen XML on every edit.

Tests: unit tests for sealing, keeping, replacing and clearing a token,
keeping an upload across an edit, and a scan-config merge; an integration
test (MongoDB) that renames a target and enables a scan and finds both
the git token and the tracker token still stored.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-09-23 16:11:34 +02:00