mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-13 03:48:06 +01:00
test: assemble GitHub-token fixtures at runtime in the new brain-sync and skill-start tests (CI credential scan)
This commit is contained in:
1 parent
0c598f80de
commit
068a3099ba
2 files changed
+3
-3
No files matched your search
@@ -434,7 +434,7 @@ describe('gstack-brain-sync per-file hold', () => {
|
||||
const CLEAN = 'projects/p/ceo-plans/clean.md';
|
||||
const LOG = 'projects/p/decisions.jsonl';
|
||||
const SNAP = 'projects/p/decisions.active.json';
|
||||
const TOKEN = 'ghp_abcdefghij1234567890abcdef1234567890';
|
||||
const TOKEN = ['ghp', 'abcdefghij1234567890abcdef1234567890'].join('_');
|
||||
const SELF = path.join(BIN, 'gstack-brain-sync');
|
||||
const statusRaw = () => fs.readFileSync(path.join(tmpHome, '.brain-sync-status.json'), 'utf-8');
|
||||
const statusJson = () => JSON.parse(statusRaw());
|
||||
|
||||
@@ -531,7 +531,7 @@ describe('ARTIFACTS_SYNC attention lines (sync status table)', () => {
|
||||
});
|
||||
|
||||
test('attention lines carry no status text, artifact path or bare helper name', () => {
|
||||
const leak = 'ghp_abcdefghij1234567890abcdef1234567890';
|
||||
const leak = ['ghp', 'abcdefghij1234567890abcdef1234567890'].join('_');
|
||||
const gh = syncHome(status('held', {
|
||||
held_count: 7,
|
||||
message: `secret pattern detected (github-token:${leak.slice(0, 30)}...) in projects/p/learnings.jsonl`,
|
||||
@@ -571,7 +571,7 @@ describe('ARTIFACTS_SYNC attention lines (sync status table)', () => {
|
||||
bin('gstack-config', ['set', 'artifacts_sync_mode_prompted', 'true']);
|
||||
bin('gstack-config', ['set', 'update_check', 'false']);
|
||||
fs.mkdirSync(path.join(gh, 'projects/p/ceo-plans'), { recursive: true });
|
||||
fs.writeFileSync(path.join(gh, 'projects/p/learnings.jsonl'), '{"gh":"ghp_abcdefghij1234567890abcdef1234567890"}\n');
|
||||
fs.writeFileSync(path.join(gh, 'projects/p/learnings.jsonl'), `{"gh":"${['ghp', 'abcdefghij1234567890abcdef1234567890'].join('_')}"}\n`);
|
||||
fs.writeFileSync(path.join(gh, 'projects/p/ceo-plans/clean.md'), '# a plan\n');
|
||||
bin('gstack-brain-enqueue', ['projects/p/learnings.jsonl']);
|
||||
bin('gstack-brain-enqueue', ['projects/p/ceo-plans/clean.md']);
|
||||
|
||||
Reference in new issue
Block a user