mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-05 00:03:15 +01:00
fix(review): JSON findings state no Blocks field; the code-class FIXABLE check takes only a Blocks: field (GST-1031 review pass 2)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
1c19bf420c
commit
6c59cd2d33
2 files changed
+8
-5
No files matched your search
@@ -115,7 +115,11 @@ describe('the blocker count keys on Blocks (GST-1031 case 3)', () => {
|
||||
expect([out, c.lines[0]!.stated?.blocks, ledgerBlockers(path.join(d, 'l.jsonl')).map(b => b.id)]).toEqual([out, undefined, ['outside-voice#1']]);
|
||||
fs.rmSync(d, { recursive: true, force: true });
|
||||
}
|
||||
expect(labels('adversarial-native', '**1. Race in a.ts:3. FIXABLE.**\nIt blocks no attacker.\nSeverity: Low.', true)).toEqual(['CRITICAL']);
|
||||
for (const raises of [true, false]) expect(labels('adversarial-native', '**1. Race in a.ts:3. FIXABLE.**\nIt blocks no attacker.\nSeverity: Low.', raises)).toEqual(['CRITICAL']);
|
||||
const d = fs.mkdtempSync(path.join(os.tmpdir(), 'gst1031j-'));
|
||||
collect(path.join(d, 'l.jsonl'), 'specialist', JSON.stringify({ severity: 'CRITICAL', path: 'lib/auth.ts', line: 9, summary: 'the old guard, which a reader marked `Blocks: no`, is gone so any caller gets admin' }) + '\n', path.join(d, 'm.jsonl'));
|
||||
expect(ledgerBlockers(path.join(d, 'l.jsonl')).map(b => b.id)).toEqual(['specialist#1']);
|
||||
fs.rmSync(d, { recursive: true, force: true });
|
||||
});
|
||||
test('classify and the row count key on Blocks, and a raw holding both Blocks: yes and no blocks', () => {
|
||||
expect(isBlocking({ severity: 'CRITICAL', stated: { severity: 'Critical', blocks: 'no' } })).toBe(false);
|
||||
|
||||
Reference in new issue
Block a user