🔒 [security fix] Mask sensitive tokens in GitHub Actions logs

- Added `core.setSecret(token)` to mask the primary GitHub token.
- Added `core.setSecret(githubMcpToken)` to mask the GitHub MCP token.
- Updated `__fixtures__/core.ts` to include the `setSecret` mock.
- Updated `__tests__/main.test.ts` to verify `setSecret` is called for the tokens.
This commit is contained in:
google-labs-jules[bot]
2026-03-10 22:44:58 +00:00
parent b7792492cd
commit 9d962e5274
3 changed files with 6 additions and 0 deletions
+2
View File
@@ -136,6 +136,7 @@ describe('main.ts', () => {
await run()
expect(core.setOutput).toHaveBeenCalled()
expect(core.setSecret).toHaveBeenCalledWith('fake-token')
verifyStandardResponse()
expect(mockProcessExit).toHaveBeenCalledWith(0)
})
@@ -199,6 +200,7 @@ describe('main.ts', () => {
await run()
expect(core.setSecret).toHaveBeenCalledWith('fake-token')
expect(mockConnectToGitHubMCP).toHaveBeenCalledWith('fake-token', '')
expect(mockMcpInference).toHaveBeenCalledWith(
expect.objectContaining({