mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
Remove token-related logging for security
- Remove token type detection logging - Remove token age/creation time logging - Keep only non-sensitive debugging info (repo, branch, request IDs) While the token value was never logged, it's better to err on the side of caution and not log any token-related information.
This commit is contained in:
@@ -87,14 +87,6 @@ server.tool(
|
||||
throw new Error("GITHUB_TOKEN environment variable is required");
|
||||
}
|
||||
|
||||
// Log token info for debugging
|
||||
console.error(`[commit_files] Token type: ${githubToken.startsWith('ghs_') ? 'GitHub App' : githubToken.startsWith('ghp_') ? 'PAT' : 'Unknown'}`);
|
||||
console.error(`[commit_files] Token created at: ${process.env.TOKEN_CREATED_AT || 'unknown'}`);
|
||||
if (process.env.TOKEN_CREATED_AT) {
|
||||
const tokenAge = Date.now() - new Date(process.env.TOKEN_CREATED_AT).getTime();
|
||||
console.error(`[commit_files] Token age: ${(tokenAge/60000).toFixed(1)} minutes`);
|
||||
}
|
||||
|
||||
const processedFiles = files.map((filePath) => {
|
||||
if (filePath.startsWith("/")) {
|
||||
return filePath.slice(1);
|
||||
|
||||
@@ -35,7 +35,6 @@ export async function prepareMcpConfig(
|
||||
REPO_NAME: repo,
|
||||
BRANCH_NAME: branch,
|
||||
REPO_DIR: process.env.GITHUB_WORKSPACE || process.cwd(),
|
||||
TOKEN_CREATED_AT: new Date().toISOString(),
|
||||
GITHUB_API_URL: process.env.GITHUB_API_URL || "https://api.github.com",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user