Repository navigation
feat(harness-ops): print a none: line from cli account.mjs under API-key auth #13771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| bump: minor | ||
| --- | ||
|
|
||
| ### Added | ||
|
|
||
| - control-claude-code's `cli/account.mjs` handles API-key auth. When `claude auth status --json` reports `authMethod` `api_key` with no email and no organization, it prints the one line `none: API-key auth has no signed-in account` and exits 0 ([#13760](https://github.com/melodic-software/claude-code-plugins/issues/13760)). Drive's contract defines no `none:` output for a `values:` source, so its mask post-check reads that line as one literal value to scan for. Any other auth method with no email or organization still exits 1 with nothing on stdout. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,19 @@ | ||
| #!/usr/bin/env node | ||
| // Prints the signed-in account's email and organization name, one per line, for | ||
| // drive's mask post-check (SKILL.md `## Mask` `values:`). Reads only; see README.md. | ||
| import { accountValues } from '../driver/driver.mjs'; | ||
| import { authStatus, statusValues } from '../driver/driver.mjs'; | ||
|
|
||
| const args = process.argv.slice(2); | ||
| if (args.length) { | ||
| console.error(`account takes no arguments: ${args.join(' ')}`); | ||
| process.exit(2); | ||
| } | ||
| try { | ||
| const values = accountValues(); | ||
| if (!values.length) throw new Error('claude auth status names no email or organization'); | ||
| console.log(values.join('\n')); | ||
| const status = authStatus(); | ||
| const values = statusValues(status); | ||
| if (values.length) console.log(values.join('\n')); | ||
| else if (status?.authMethod === 'api_key') console.log('none: API-key auth has no signed-in account'); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This loosens the publish gate before the key-auth mask has been checked against a real screen. Before: under API-key auth Now: it exits 0 and prints one line. Nothing in drive gives a What a key-auth run gets:
Possible fixes (either one):
severity: IMPORTANT claude-lane: claude-security-review
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pr-unblock / address-feedback: UNCERTAIN, left open Evidence:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pr-unblock / adjudicate-feedback: the finding stands A fresh-context adjudicator read the review comment, the locations both sides cited and the code at Evidence:
melodic-automation-lanes[bot] marked this conversation as resolved.
Resolved
|
||
| else throw new Error('claude auth status names no email or organization'); | ||
| } catch (err) { | ||
| console.error(`account: ${err.message}`); | ||
| process.exit(1); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pr-verify verifier failed head |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pr-verify verifier failed head
cf8c4f2474c63995be8bed201f08709fc6c2d45e. What it wrote, as data:What it wrote (26 lines)