vvauth 2.6.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish-npm.yml +2 -4
- package/.github/workflows/test.yml +2 -1
- package/API_and_tests.md +101 -118
- package/README.md +64 -101
- package/SECURITY_AUDIT_COORDINATION.md +36 -0
- package/SECURITY_AUDIT_PROVENANCE.json +35 -0
- package/SECURITY_AUDIT_claude-opus-5-5.md +288 -0
- package/SECURITY_AUDIT_gpt-6.1-sol.md +323 -109
- package/cmd/vauth/main.go +10 -25
- package/cmd/vauth.js +12 -0
- package/gitlab.go +47 -0
- package/gitlab_test.go +116 -0
- package/go.mod +4 -3
- package/go.sum +8 -10
- package/index.js +63 -88
- package/package.json +6 -5
- package/rc.go +81 -193
- package/test/token-cache.js +122 -14
- package/vauth.go +32 -32
- package/vauth_test.go +76 -23
- package/SECURITY_AUDIT_fable-5.1.md +0 -88
|
@@ -1,196 +1,410 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Security Audit — vvauth
|
|
2
2
|
|
|
3
|
-
**
|
|
4
|
-
**
|
|
3
|
+
- **Assessed commit:** `f368802700f03c8b632bbacefbfc71dbfaae04f4`
|
|
4
|
+
- **Assessment date:** October 25, 2026
|
|
5
|
+
- **Source state:** `master`, pre-release functional source; current Node and Go manifests declare `2.6.0`
|
|
6
|
+
- **Checkout:** `/var/monolith/3rd/github.com/131/vvauth`
|
|
7
|
+
- **Canonical remote:** `git@github.com:131/vvauth.git`
|
|
8
|
+
- **Execution model:** `gpt-6.1-sol_codeassist`, as declared by the host. The tools available to this review do not independently expose the execution-model identifier; no differing model was disclosed or selected. Client configuration and environment values were not inspected to identify the model.
|
|
5
9
|
|
|
6
|
-
##
|
|
10
|
+
## 1. Provenance
|
|
7
11
|
|
|
8
|
-
This is
|
|
12
|
+
This is an independent, source-only assessment of the current implementation, selected installed dependency sources, tests, manifests, and release workflows. Findings were derived from those inputs, not from an intended design.
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
The following inputs were excluded:
|
|
11
15
|
|
|
12
|
-
- `
|
|
13
|
-
-
|
|
14
|
-
-
|
|
16
|
+
- Every `SECURITY_AUDIT*.md` file, including the existing file bearing this report’s intended filename.
|
|
17
|
+
- Every `README.md`, at every depth.
|
|
18
|
+
- Previous assessments, scores, reports, conversations, and handoffs.
|
|
19
|
+
- Assessment content in Git history and assessment-related commit messages.
|
|
20
|
+
- Dependency Markdown containing advisories or audits.
|
|
21
|
+
- Personal context, task indexes, and neighboring project documentation.
|
|
22
|
+
- Real credentials, user configuration files, real Vault services, and network resources.
|
|
15
23
|
|
|
16
|
-
|
|
24
|
+
Excluded filenames were visible in the initial filename inventory; their contents were not read or searched. Only heading line numbers and titles were inspected in `API_and_tests.md`; its entire body was omitted.
|
|
17
25
|
|
|
18
|
-
|
|
26
|
+
The applicable `$AGENT_WORKSPACE/AGENTS.md` was read. The checkout is unmapped in the internal monolith, and no neighboring project rules were adopted.
|
|
19
27
|
|
|
20
|
-
|
|
28
|
+
No repository files were modified. Git metadata confirmed the assessed commit, branch, canonical remote, and clean tracked working tree.
|
|
21
29
|
|
|
22
|
-
|
|
30
|
+
The public upstream, existing npm/Go/native releases, and authorization for a future patch release are operator-provided context, not independently network-verified facts in this review. This assessment does not certify an unpublished patch or authorize publication.
|
|
23
31
|
|
|
24
|
-
|
|
32
|
+
## 2. Scope and Method
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
### 2.1 Explicit input inventory
|
|
27
35
|
|
|
28
|
-
|
|
36
|
+
#### Project implementation
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
- `index.js`
|
|
39
|
+
- `cmd/vauth.js`
|
|
40
|
+
- `vauth.go`
|
|
41
|
+
- `vault.go`
|
|
42
|
+
- `rc.go`
|
|
43
|
+
- `gitlab.go`
|
|
44
|
+
- `cmd/vauth/main.go`
|
|
31
45
|
|
|
32
|
-
|
|
33
|
-
- **Well-covered lease decisions.** Tests exercise expiry, proportional renewal thresholds, lease-baseline preservation, nonrenewable replacement, forced reauthentication, environment-token precedence, disabled caching, and ordinary reuse without rewriting the cache.
|
|
34
|
-
- **Reasonable failure classification in token lookup/renewal.** HTTP 400/403 can trigger reauthentication, whereas server/network failures are propagated instead of creating extra tokens (`index.js:178–202`, `vauth.go:181–215,255–263`).
|
|
35
|
-
- **Good shell-value quoting and key checks on the normal environment path.** Bash values are single-quoted with embedded quotes escaped; `env.map` names are validated in both implementations. Resolution completes before export output begins (`index.js:330–335,489–492`, `vauth.go:419–431,448–459`).
|
|
36
|
-
- **Secrets are not printed in ordinary success diagnostics.** Token status and sourced export echoes are redacted; JSON output can be separated from stderr diagnostics.
|
|
37
|
-
- **Go has useful architectural seams.** Typed configuration, injectable HTTP client/clock/streams/environment, and separate transport/cache files make the library more maintainable and testable than a single CLI-bound implementation.
|
|
38
|
-
- **CI has basic quality gates and restrained permissions.** Linting, formatting, vetting, and tests are present; regular CI has read-only repository permissions. Go release configuration includes trimmed builds, version injection, checksums, and a Windows signing hook.
|
|
46
|
+
These cover profile resolution, private KV updates, environment mapping, shell publication, local encrypted credentials, Git remote interpretation, construction, and CLI dispatch.
|
|
39
47
|
|
|
40
|
-
|
|
48
|
+
#### Repository tests
|
|
41
49
|
|
|
42
|
-
|
|
50
|
+
- `test/token-cache.js`
|
|
51
|
+
- `vauth_test.go`
|
|
52
|
+
- `gitlab_test.go`
|
|
43
53
|
|
|
44
|
-
|
|
54
|
+
The test-case indexes and selected bodies were inspected, particularly fixture construction, disposable-agent setup, cache lifecycle, shell forwarding, transport inheritance, unknown-Vault rejection, local decryption, scalar validation, configuration snapshots, and GitLab publication. This was not an exhaustive assertion-by-assertion review of every test body.
|
|
45
55
|
|
|
46
|
-
|
|
56
|
+
#### Manifests and supporting configuration
|
|
47
57
|
|
|
48
|
-
|
|
58
|
+
- `package.json`
|
|
59
|
+
- `package-lock.json` — selected metadata and dependency entries
|
|
60
|
+
- `go.mod`
|
|
61
|
+
- `go.sum`
|
|
62
|
+
- `.npmrc`
|
|
63
|
+
- `.gitignore`
|
|
64
|
+
- `.eslintrc`
|
|
65
|
+
- `.eslintignore`
|
|
49
66
|
|
|
50
|
-
|
|
67
|
+
The local `package-lock.json` is ignored and untracked. Its stale contents were treated as local metadata, not as the canonical dependency specification.
|
|
51
68
|
|
|
52
|
-
|
|
69
|
+
`package.json` declares **ISC**. No standalone project license text was independently verified.
|
|
53
70
|
|
|
54
|
-
|
|
71
|
+
#### Release and CI configuration
|
|
55
72
|
|
|
56
|
-
|
|
73
|
+
- `.github/workflows/test.yml`
|
|
74
|
+
- `.github/workflows/publish-npm.yml`
|
|
75
|
+
- `.github/workflows/release.yml`
|
|
76
|
+
- `.goreleaser.yaml`
|
|
57
77
|
|
|
58
|
-
|
|
78
|
+
#### Selected installed Node dependency inputs
|
|
59
79
|
|
|
60
|
-
|
|
80
|
+
Under `node_modules/`:
|
|
61
81
|
|
|
62
|
-
|
|
82
|
+
- `vauth-login/index.js`
|
|
83
|
+
- `ssh-agent-crypt/index.js`
|
|
84
|
+
- `nyks/http/request.js`
|
|
85
|
+
- `nyks/stream/drain.js`
|
|
86
|
+
- `nyks/string/replaceEnv.js`
|
|
87
|
+
- `nyks/string/stripStart.js`
|
|
88
|
+
- `nyks/object/jqdive.js`
|
|
89
|
+
- `nyks/object/walk.js`
|
|
90
|
+
- `nyks/object/structuredClone.js`
|
|
91
|
+
- `nyks/object/freeze.js`
|
|
92
|
+
- `nyks/child_process/exec.js`
|
|
93
|
+
- `nyks/process/parseArgs.js`
|
|
94
|
+
- `nyks/function/promiser.js`
|
|
95
|
+
- `nyks/async/eachLimit.js`
|
|
96
|
+
- `nyks/date/humanDiff.js`
|
|
63
97
|
|
|
64
|
-
|
|
98
|
+
Selected manifest fields were read from the installed `nyks`, `vauth-login`, `ssh-agent-crypt`, `cnyks`, `mout`, and `semver` packages. The installed versions of the three principal shared dependencies matched the supplied context:
|
|
65
99
|
|
|
66
|
-
|
|
100
|
+
| Dependency | Node installed version | Go requirement |
|
|
101
|
+
|---|---:|---:|
|
|
102
|
+
| nyks | 6.18.0 | v6.18.0 |
|
|
103
|
+
| vauth-login | 1.1.7 | v1.1.7 |
|
|
104
|
+
| ssh-agent-crypt | 1.4.4 | v1.4.4 |
|
|
67
105
|
|
|
68
|
-
|
|
106
|
+
#### Selected cached Go dependency inputs
|
|
69
107
|
|
|
70
|
-
|
|
108
|
+
Under `/root/go/pkg/mod/`:
|
|
71
109
|
|
|
72
|
-
|
|
110
|
+
- `github.com/131/vauth-login@v1.1.7/{go.mod,vauth.go,rc.go,cache.go,vault.go}`
|
|
111
|
+
- `github.com/131/ssh-agent-crypt@v1.4.4/{go.mod,sshagentcrypt.go,agent_unix.go,agent_windows.go}`
|
|
112
|
+
- `github.com/131/nyks/v6@v6.18.0/go.mod`
|
|
113
|
+
- `github.com/131/nyks/v6@v6.18.0/string/replaceEnv.go`
|
|
114
|
+
- `github.com/131/nyks/v6@v6.18.0/object/{jqdive.go,walk.go}`
|
|
115
|
+
- `github.com/131/nyks/v6@v6.18.0/date/humanDiff.go`
|
|
116
|
+
- `github.com/131/nyks/v6@v6.18.0/internal/js/string.go`
|
|
73
117
|
|
|
74
|
-
|
|
118
|
+
Dependency paths in findings below refer to these installed versions.
|
|
75
119
|
|
|
76
|
-
|
|
120
|
+
### 2.2 Safe local checks performed
|
|
77
121
|
|
|
78
|
-
|
|
122
|
+
| Check | Result |
|
|
123
|
+
|---|---|
|
|
124
|
+
| Git commit, branch, remote, and tracked status inspection | Matched the stated checkout; tracked tree remained clean |
|
|
125
|
+
| `node --version` | v22.22.2 |
|
|
126
|
+
| `GOTOOLCHAIN=local go version` | go1.24.0, Linux/amd64 |
|
|
127
|
+
| `node --check` on `index.js`, `cmd/vauth.js`, and `test/token-cache.js` | Passed |
|
|
128
|
+
| `gofmt -l` on all seven project Go source/test files | No formatting differences reported |
|
|
129
|
+
| ESLint on the three selected project JavaScript files, with `--no-cache`, no fixes, and a minimal environment | Passed |
|
|
130
|
+
| `GOTOOLCHAIN=local GOPROXY=off GOSUMDB=off GOFLAGS=-mod=readonly go list -m all` | Passed using available local module metadata; no replacements reported |
|
|
131
|
+
| Local JSON parsing of manifest and selected lockfile metadata | Completed; an initial URL-only formatter rejected a relative lockfile entry and was corrected |
|
|
79
132
|
|
|
80
|
-
|
|
133
|
+
These checks do not establish runtime correctness or absence of vulnerabilities.
|
|
81
134
|
|
|
82
|
-
|
|
135
|
+
### 2.3 Checks not performed
|
|
83
136
|
|
|
84
|
-
|
|
137
|
+
- **`node --test`, `npm test`, and `go test`:** repository fixtures create temporary directories, SSH keys, disposable agents, and loopback HTTP listeners. They were not executed under this strictly read-only, no-network review.
|
|
138
|
+
- **`go vet` and native builds:** these can require compiler work directories and cache writes. They were not attempted under the filesystem restriction.
|
|
139
|
+
- **Windows runtime tests:** no Windows execution environment was available.
|
|
140
|
+
- **npm installation, Go module downloads, npm audit, and live vulnerability scanning:** prohibited by the source-only and no-network scope.
|
|
141
|
+
- **Release execution, signing, artifact installation, and Vault integration:** outside reviewer authorization.
|
|
142
|
+
- **Published-package or binary comparison:** no network retrieval was permitted.
|
|
85
143
|
|
|
86
|
-
|
|
144
|
+
No real credentials, token caches, SSH agents, or Vault endpoints were accessed.
|
|
87
145
|
|
|
88
|
-
|
|
146
|
+
## 3. Prioritized Findings
|
|
89
147
|
|
|
90
|
-
|
|
148
|
+
“Verified observation” below means directly established from the inspected source or local metadata. It does **not** imply that an exploit was dynamically reproduced.
|
|
91
149
|
|
|
92
|
-
|
|
150
|
+
### F1 — High: Vault destination trust does not establish trust in the environment being sourced
|
|
93
151
|
|
|
94
|
-
|
|
152
|
+
**Classification:** Verified observation; downstream exploitation is conditional on sourcing an attacker-controlled project configuration.
|
|
95
153
|
|
|
96
|
-
**
|
|
154
|
+
**Evidence**
|
|
97
155
|
|
|
98
|
-
|
|
156
|
+
- `node_modules/vauth-login/index.js:62–105` selects project configuration and checks whether its Vault address is known.
|
|
157
|
+
- `index.js:193–197` validates environment-key syntax but does not restrict sensitive names.
|
|
158
|
+
- `vauth.go:313–322` implements the same unrestricted mapping behavior.
|
|
159
|
+
- `index.js:26` and `vauth.go:35–36` install a function that sources the generated exports.
|
|
160
|
+
- `index.js:163–166,193–197` and `vauth.go:256–262,314–322` allow mapped values to replace initially selected `VAULT_TOKEN` and `VAULT_ADDR`.
|
|
99
161
|
|
|
100
|
-
**
|
|
162
|
+
**Impact**
|
|
101
163
|
|
|
102
|
-
|
|
164
|
+
A syntactically valid key can still change security-sensitive behavior. A project configuration can export `PATH`, `BASH_ENV`, `NODE_OPTIONS`, loader-related variables, or replacement Vault credentials and addresses.
|
|
103
165
|
|
|
104
|
-
|
|
166
|
+
Shell quoting prevents a value from becoming an immediate shell command during assignment. It does not prevent subsequent commands or runtimes from acting on that value. A malicious `PATH`, for example, can redirect later command execution.
|
|
105
167
|
|
|
106
|
-
|
|
168
|
+
The known-Vault check protects requests to the selected endpoint; it is not an approval mechanism for the rest of `.vauthrc`. Configurations that require no Vault request can also reach environment publication.
|
|
107
169
|
|
|
108
|
-
|
|
170
|
+
**Suggested fix**
|
|
109
171
|
|
|
110
|
-
|
|
172
|
+
Treat approval of a configuration’s environment effects separately from approval of its Vault endpoint. Require explicit trust before sourcing an untrusted project configuration, preferably tied to its contents. Offer a restricted mode that blocks execution-controlling variables and credential/address overrides unless separately authorized. Preserve unrestricted behavior only as an explicit trusted-config choice.
|
|
111
173
|
|
|
112
|
-
|
|
174
|
+
### F2 — Medium: The installed shell wrapper can hide environment-generation failure
|
|
113
175
|
|
|
114
|
-
**
|
|
176
|
+
**Classification:** Verified observation based on the generated Bash function.
|
|
115
177
|
|
|
116
|
-
|
|
178
|
+
**Evidence**
|
|
117
179
|
|
|
118
|
-
|
|
180
|
+
- `index.js:26`
|
|
181
|
+
- `vauth.go:35–36`
|
|
119
182
|
|
|
120
|
-
|
|
183
|
+
Both define:
|
|
121
184
|
|
|
122
|
-
|
|
185
|
+
```bash
|
|
186
|
+
function venv() { source <(/usr/bin/env vauth env --source "$@"); }
|
|
187
|
+
```
|
|
123
188
|
|
|
124
|
-
|
|
189
|
+
The forwarding test at `test/token-cache.js:372–410` exercises successful operation.
|
|
125
190
|
|
|
126
|
-
|
|
191
|
+
**Impact**
|
|
127
192
|
|
|
128
|
-
|
|
193
|
+
Bash returns the status of `source`, not reliably the exit status of the process-substitution producer. If the CLI fails without producing exports, sourcing an empty stream can succeed.
|
|
129
194
|
|
|
130
|
-
|
|
195
|
+
Scripts using `venv && ...` may therefore continue with stale credentials or an old environment after authentication, configuration, or decryption failure. The CLI can correctly reject an operation while its installed shell integration obscures that rejection.
|
|
131
196
|
|
|
132
|
-
|
|
197
|
+
**Suggested fix**
|
|
133
198
|
|
|
134
|
-
|
|
199
|
+
Capture generated output, check the CLI’s exit status, and source it only after successful completion. Add repository tests covering failed authentication, malformed configuration, and decryption failure through the installed function. Define the expected handling of stale credentials.
|
|
135
200
|
|
|
136
|
-
###
|
|
201
|
+
### F3 — Medium: Macro replacement interprets secret values as replacement syntax and has no recursion bound
|
|
137
202
|
|
|
138
|
-
**
|
|
203
|
+
**Classification:** Verified observation; resource-exhaustion consequences were not dynamically reproduced.
|
|
139
204
|
|
|
140
|
-
|
|
205
|
+
**Evidence**
|
|
141
206
|
|
|
142
|
-
|
|
207
|
+
- `node_modules/nyks/string/replaceEnv.js:20–24` uses `String.replace` with the resolved value as a replacement string, then recursively expands again.
|
|
208
|
+
- Cached Go `nyks/string/replaceEnv.go:45–50,72–99` reproduces JavaScript replacement-string semantics and recursive expansion.
|
|
209
|
+
- Call sites include `index.js:46,197` and `rc.go:196–198`, plus authentication configuration expansion in both `vauth-login` implementations.
|
|
143
210
|
|
|
144
|
-
|
|
211
|
+
**Impact**
|
|
145
212
|
|
|
146
|
-
|
|
213
|
+
Resolved values containing replacement metacharacters are not inserted literally. Examples include:
|
|
147
214
|
|
|
148
|
-
|
|
215
|
+
- `$$`, which becomes a single dollar sign.
|
|
216
|
+
- `$&`, which substitutes the matched macro.
|
|
217
|
+
- Prefix/suffix replacement forms, which introduce surrounding template text.
|
|
149
218
|
|
|
150
|
-
|
|
219
|
+
This can corrupt passwords, tokens, connection strings, and configuration values. A replacement that recreates the original macro can also cause repeated recursion rather than a bounded error.
|
|
151
220
|
|
|
152
|
-
|
|
221
|
+
Cross-language agreement does not eliminate the defect: both implementations deliberately share these semantics.
|
|
153
222
|
|
|
154
|
-
**
|
|
223
|
+
**Suggested fix**
|
|
155
224
|
|
|
156
|
-
|
|
225
|
+
Insert resolved values literally. In Node, use a replacement callback; in Go, concatenate the intended segments without interpreting replacement metacharacters. Add cycle detection, expansion-count limits, and output-size limits. Add shared regression fixtures for dollar-containing credentials and non-progressing expansion.
|
|
157
226
|
|
|
158
|
-
|
|
159
|
-
- Go implements `version`/`--version`; the Node class and inspected runner contain no corresponding version command.
|
|
160
|
-
- Node's runner leaves the textual flag value `false` as a truthy string, contrary to the documented boolean rule; Go interprets it as false. Node also coerces numeric-looking `set` arguments, unlike Go's string-preserving CLI.
|
|
161
|
-
- Node's child helper turns any nonzero child status into a generic rejection and exits 1; Go propagates the child's exit code.
|
|
162
|
-
- The documented `vauth run -- <command>` form passes `--` as the executable in both dedicated run paths, which forward original arguments rather than consuming that separator.
|
|
227
|
+
### F4 — Medium: Node release dependencies are not reproducibly locked
|
|
163
228
|
|
|
164
|
-
**
|
|
229
|
+
**Classification:** Verified observation.
|
|
165
230
|
|
|
166
|
-
|
|
231
|
+
**Evidence**
|
|
167
232
|
|
|
168
|
-
|
|
233
|
+
- `package.json:15–21` uses caret ranges for runtime dependencies.
|
|
234
|
+
- `.npmrc:1` disables package-lock handling.
|
|
235
|
+
- `.gitignore:2` excludes `package-lock.json`.
|
|
236
|
+
- `.github/workflows/publish-npm.yml:21` and `.github/workflows/test.yml:18` use `npm install`.
|
|
237
|
+
- The ignored local lockfile declares `2.5.0` at lines `3` and `9` and contains older dependency entries.
|
|
169
238
|
|
|
170
|
-
|
|
239
|
+
**Impact**
|
|
171
240
|
|
|
172
|
-
The
|
|
241
|
+
The dependency graph tested and published can change without a source-commit change. Future compatible dependency releases can alter authentication, cryptography, or transport behavior in CI.
|
|
173
242
|
|
|
174
|
-
|
|
243
|
+
The local lockfile is not evidence of current development replacements: its stale links and versions do not describe the inspected installed dependency versions. It nevertheless cannot serve as a reproducible release input.
|
|
175
244
|
|
|
176
|
-
**
|
|
245
|
+
**Suggested fix**
|
|
177
246
|
|
|
178
|
-
|
|
247
|
+
Adopt a committed, current lockfile and `npm ci` for CI and publication, with reviewed dependency updates. Record the actual release dependency graph. Keep consumer-facing ranges if desired, but make the publisher’s build and test environment reproducible.
|
|
179
248
|
|
|
180
|
-
|
|
181
|
-
2. Fix the explicit CLI-contract mismatches and the shell wrapper's failure propagation.
|
|
182
|
-
3. Validate/version cache payloads, eliminate fixed staging names, and make lifecycle decisions concurrency-safe.
|
|
183
|
-
4. Define token ownership, authentication identity, configuration immutability, and macro semantics.
|
|
184
|
-
5. Add shared end-to-end parity fixtures, real platform tests, and reproducible/protected release gates.
|
|
249
|
+
### F5 — Medium: Release execution relies on mutable external references, including the signing helper
|
|
185
250
|
|
|
186
|
-
|
|
251
|
+
**Classification:** Verified observation; compromise of those upstream references is a hypothesis, not an observed event.
|
|
187
252
|
|
|
188
|
-
|
|
253
|
+
**Evidence**
|
|
189
254
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
| Safety | **10 / 20** | Encryption and shell-value hygiene are good, but implicit configuration trust, Go redirect leakage, token retention, and insufficient context validation need hardening. |
|
|
255
|
+
- `.github/workflows/release.yml:15–30` uses major-version action references, checks out `131/gh-actions` at `v1`, and selects a GoReleaser version range.
|
|
256
|
+
- `.goreleaser.yaml:18–19` executes the externally checked-out signing helper.
|
|
257
|
+
- `.github/workflows/release.yml:31–33` supplies release and signing-related values to the release step.
|
|
258
|
+
- Publication and test workflows also use major-version action references.
|
|
195
259
|
|
|
196
|
-
**
|
|
260
|
+
**Impact**
|
|
261
|
+
|
|
262
|
+
The same source tag can execute different third-party or shared workflow code over time. The signing helper is particularly sensitive because it participates in creating a trusted executable and runs within the release credential boundary.
|
|
263
|
+
|
|
264
|
+
This checkout does not contain the helper implementation, so its behavior and protection of signing access were not verified.
|
|
265
|
+
|
|
266
|
+
**Suggested fix**
|
|
267
|
+
|
|
268
|
+
Pin actions and the signing-helper checkout to reviewed commit hashes; pin the GoReleaser version. Update them through review. Minimize credential exposure across steps and verify the signed artifact after the hook. Retain an explicit record of the workflow and helper revisions used for each release.
|
|
269
|
+
|
|
270
|
+
### F6 — Medium: Trusted endpoints may still use plaintext HTTP
|
|
271
|
+
|
|
272
|
+
**Classification:** Verified observation; exposure depends on deployment configuration and network position.
|
|
273
|
+
|
|
274
|
+
**Evidence**
|
|
275
|
+
|
|
276
|
+
- `node_modules/vauth-login/index.js:308–324` accepts the configured URL without requiring HTTPS.
|
|
277
|
+
- `node_modules/nyks/http/request.js:63` selects HTTPS only for `https:`.
|
|
278
|
+
- Cached Go `vauth-login/vault.go:55–65` creates a request and attaches `X-Vault-Token` without enforcing HTTPS.
|
|
279
|
+
|
|
280
|
+
**Impact**
|
|
281
|
+
|
|
282
|
+
An explicitly trusted non-loopback HTTP endpoint can receive JWT login payloads, bearer tokens, and secret responses without transport encryption. Destination approval is not equivalent to transport protection.
|
|
283
|
+
|
|
284
|
+
No real deployment was inspected, and this finding does not assert that production currently uses HTTP. Repository loopback HTTP fixtures are appropriate for synthetic tests.
|
|
285
|
+
|
|
286
|
+
**Suggested fix**
|
|
287
|
+
|
|
288
|
+
Require HTTPS for non-loopback destinations by default. Provide an explicit insecure-development exception rather than silently accepting plaintext transport. Validate the URL scheme early and retain normal certificate verification.
|
|
289
|
+
|
|
290
|
+
### F7 — Medium: HTTP response buffering is unbounded
|
|
291
|
+
|
|
292
|
+
**Classification:** Verified observation.
|
|
293
|
+
|
|
294
|
+
**Evidence**
|
|
295
|
+
|
|
296
|
+
- `node_modules/vauth-login/index.js:324–325` drains the full response.
|
|
297
|
+
- `node_modules/nyks/stream/drain.js:12,21–26` accumulates every chunk before concatenation.
|
|
298
|
+
- Cached Go `vauth-login/vault.go:69–70` calls `io.ReadAll` without a size limit.
|
|
299
|
+
|
|
300
|
+
**Impact**
|
|
301
|
+
|
|
302
|
+
An oversized response from an approved, compromised, malfunctioning, or intercepted endpoint can exhaust client memory. This applies to error responses as well as successful JSON responses.
|
|
303
|
+
|
|
304
|
+
The 60-second transport timeouts are useful but do not bound the number of bytes received within that period.
|
|
305
|
+
|
|
306
|
+
**Suggested fix**
|
|
307
|
+
|
|
308
|
+
Enforce response-size limits suitable for authentication, identity, and KV operations. Abort oversized streams before buffering completes, and return a sanitized error. Apply related bounds to local encrypted payloads where appropriate.
|
|
309
|
+
|
|
310
|
+
### F8 — Medium: Dotenv output does not encode multiline or parser-sensitive values
|
|
311
|
+
|
|
312
|
+
**Classification:** Verified observation.
|
|
313
|
+
|
|
314
|
+
**Evidence**
|
|
315
|
+
|
|
316
|
+
- `index.js:207–215` prints `${k}=${String(v)}\n`.
|
|
317
|
+
- `vauth.go:360–368` prints `%s=%s\n`.
|
|
318
|
+
- Scalar validation in `index.js:260–265` and `rc.go:129–154` does not reject line breaks.
|
|
319
|
+
|
|
320
|
+
**Impact**
|
|
321
|
+
|
|
322
|
+
A value containing a newline can become additional dotenv records when consumed by another tool. Quote, comment, and whitespace interpretation also depends on the downstream dotenv parser.
|
|
323
|
+
|
|
324
|
+
The output therefore cannot reliably preserve every accepted environment value. This is a dotenv serialization problem, not a failure of the separately implemented shell quoting.
|
|
325
|
+
|
|
326
|
+
**Suggested fix**
|
|
327
|
+
|
|
328
|
+
Define a supported dotenv grammar and encode values accordingly, with round-trip tests against supported consumers. If portability cannot be guaranteed, reject unsupported multiline or parser-sensitive values and recommend JSON or shell-export output.
|
|
329
|
+
|
|
330
|
+
### F9 — Low: Public publication helpers do not enforce their own key-safety invariant
|
|
331
|
+
|
|
332
|
+
**Classification:** Verified observation; exposure through arbitrary reflective CLI dispatch was not independently verified.
|
|
333
|
+
|
|
334
|
+
**Evidence**
|
|
335
|
+
|
|
336
|
+
- `index.js:94–100` interpolates supplied keys into both export and echo commands.
|
|
337
|
+
- `vauth.go:346–352` does the same for `OrderedMap.Keys`.
|
|
338
|
+
- The key validation exists in `Env`, at `index.js:193–196` and `vauth.go:314–316`, rather than in `PublishEnv`.
|
|
339
|
+
|
|
340
|
+
**Impact**
|
|
341
|
+
|
|
342
|
+
Normal environment resolution validates mapped keys, and internal login/GitLab callers use fixed keys. However, SDK callers can invoke the public publication helper directly with an unsafe key and obtain executable shell syntax.
|
|
343
|
+
|
|
344
|
+
The helper’s safety depends on a precondition that its implementation does not enforce.
|
|
345
|
+
|
|
346
|
+
**Suggested fix**
|
|
347
|
+
|
|
348
|
+
Validate every key at the publication boundary before writing any output. Return an error for invalid keys. Keep caller-side validation for useful diagnostics, but make the shell emitter safe independently.
|
|
349
|
+
|
|
350
|
+
### F10 — Low: Private KV updates can overwrite concurrent changes
|
|
351
|
+
|
|
352
|
+
**Classification:** Verified observation of the update algorithm; concurrent loss was not dynamically reproduced.
|
|
353
|
+
|
|
354
|
+
**Evidence**
|
|
355
|
+
|
|
356
|
+
- `index.js:104–112` reads the profile/database, modifies one key, and writes the complete database.
|
|
357
|
+
- `vauth.go:209–223` implements the same read-modify-write sequence.
|
|
358
|
+
- `index.js:228–230` and `vault.go:35–45` send complete KV data without a compare-and-set option.
|
|
359
|
+
|
|
360
|
+
**Impact**
|
|
361
|
+
|
|
362
|
+
Two clients updating different keys can read the same version and then overwrite one another’s changes. An `unset` can likewise restore unrelated stale data through the full-object write.
|
|
363
|
+
|
|
364
|
+
Vault ACLs still control access; this is an integrity/concurrency issue rather than an authorization bypass.
|
|
365
|
+
|
|
366
|
+
**Suggested fix**
|
|
367
|
+
|
|
368
|
+
Use KV-v2 version metadata and compare-and-set writes, with bounded retries after conflicts. Add concurrent update and delete regression tests.
|
|
369
|
+
|
|
370
|
+
## 4. Strengths
|
|
371
|
+
|
|
372
|
+
- **Clear separation of responsibilities.** Authentication, cache lifecycle, and HTTP requests are delegated to `vauth-login`; vvauth concentrates on profile, KV, and environment resolution.
|
|
373
|
+
- **Destination checks occur before requests.** Both inspected authentication implementations reject unknown project-selected Vault endpoints at the transport boundary.
|
|
374
|
+
- **Default redirects are not followed.** Node does not enable redirect following; the Go default client explicitly returns the last redirect response. This reduces credential-forwarding risk.
|
|
375
|
+
- **Useful transport deadlines.** Both implementations default to approximately 60 seconds.
|
|
376
|
+
- **Encrypted persistence.** New cache writes contain armor rather than plaintext tokens. Node uses exclusive temporary-file creation and rename; Go uses a temporary file and rename. New Unix directories/files request restrictive modes.
|
|
377
|
+
- **Authenticated encryption construction.** The selected cryptographic implementation uses randomized salt/IV, separated encryption/MAC keys, authenticates v3 framing, and checks the MAC before decrypting. This is a positive source observation, not a formal cryptographic proof.
|
|
378
|
+
- **Namespace separation.** New v3 key derivation uses the `ssh-agent-crypt` SSHSIG namespace rather than the generic legacy `file` namespace.
|
|
379
|
+
- **Credential-conscious diagnostics.** Token status messages do not print token values; HTTP error messages expose status rather than automatically rendering response bodies.
|
|
380
|
+
- **Inherited-token ownership is respected.** Ordinary connection does not automatically renew or persist an inherited token.
|
|
381
|
+
- **Failure behavior distinguishes invalid tokens from server failures.** Renewal failures with 400/403 can trigger reauthentication; other failures are propagated rather than blindly generating more tokens.
|
|
382
|
+
- **Shell values are quoted correctly for assignment.** Single-quote escaping and map-key syntax checks address direct shell-syntax injection in the normal `Env` path.
|
|
383
|
+
- **Configuration snapshots are preserved.** Node retains a frozen raw snapshot; Go returns independent snapshots and clones selected configuration before expansion.
|
|
384
|
+
- **Substantial synthetic fixtures exist.** Tests cover disposable agents, loopback services, cache lifecycle, transport trust, scalar validation, and CLI behavior without requiring production Vault access.
|
|
385
|
+
- **Release controls are visible.** CI permissions are declared, the native release job uses a production environment, GoReleaser emits checksums, and Windows builds have a signing hook.
|
|
386
|
+
|
|
387
|
+
Cached-token reuse without a revocation lookup is an explicit behavior represented in the tests. It improves offline reuse but can delay discovery of revocation. It does not bypass Vault’s server-side authorization.
|
|
388
|
+
|
|
389
|
+
## 5. Limitations
|
|
390
|
+
|
|
391
|
+
1. **No network access and no live vulnerability-database scanning were performed.** Dependency versions were inspected, but no claim is made that they are free of known vulnerabilities.
|
|
392
|
+
2. **Runtime suites were not executed.** Syntax, lint, formatting, and local module-graph success must not be confused with passing integration tests.
|
|
393
|
+
3. **Dependency review was selective.** It did not exhaustively cover `cnyks` reflection, SSH protocol internals, YAML parsing, Node/Go standard libraries, or all transitive dependencies.
|
|
394
|
+
4. **Cryptography was inspected, not formally audited.** Legacy v1/v2 reading remains supported. Agent compromise, memory scraping, filesystem rollback, and local same-user attacks were not experimentally evaluated.
|
|
395
|
+
5. **Agent operations do not inherit the HTTP timeout.** Agent blocking and Windows pipe behavior remain runtime verification gaps.
|
|
396
|
+
6. **No production policy was assessed.** Vault ACLs, roles, token TTL policies, endpoint configuration, GitHub environment approvals, tag protections, and npm trusted-publishing configuration were not inspected.
|
|
397
|
+
7. **Signing and installation were not verified.** The configuration establishes a Windows signing hook, not proof of a valid signature. The Linux build has checksum generation, but this checkout does not show an equivalent Linux signing hook.
|
|
398
|
+
8. **Published artifacts were not compared with source.** No npm tarball, module archive, release binary, checksum, or provenance attestation was retrieved.
|
|
399
|
+
9. **The upcoming patch remains outside this assessment.** Findings apply to the identified functional source and selected installed dependency versions.
|
|
400
|
+
10. **Execution-model identity is host-declared.** It was not independently verified through client or environment inspection.
|
|
401
|
+
|
|
402
|
+
This report is not a release approval or a guarantee of safety. The highest-priority improvements are explicit configuration trust, reliable shell failure propagation, and literal, bounded interpolation.
|
|
403
|
+
|
|
404
|
+
## 6. Scores
|
|
405
|
+
|
|
406
|
+
| Category | Score | Justification |
|
|
407
|
+
|---|---:|---|
|
|
408
|
+
| **Coolness** | **17/20** | A compact, useful dual-language credentials helper combining Vault profiles, encrypted local data, environment resolution, native CLI distribution, and shared behavior. |
|
|
409
|
+
| **Robustness** | **13/20** | Strong synthetic fixtures, configuration snapshots, cache lifecycle handling, and transport deadlines; deductions for shell failure masking, interpolation semantics, serialization gaps, unbounded buffering, and lost-update risk. Runtime verification remains incomplete. |
|
|
410
|
+
| **Safety** | **12/20** | Meaningful destination checks, encrypted persistence, redacted diagnostics, and shell quoting; deductions for the untrusted-configuration boundary, optional plaintext transport, publication-helper preconditions, and mutable release inputs. This score is not a vulnerability-database clearance. |
|