Skip to content

Commit 0cf11a0

Browse files
committed
test(security): pin the shrunken audit allowlist
The allowlist dropped the accessor and crypto modules — neither holds a query — but the audit's own test still asserted their exemption. It now asserts the inverse: only credential-service and slack are exempt, and the other two are audited like any file. This test runs from the root test chain, which is why the apps/sim suite stayed green while CI went red.
1 parent 6af75ae commit 0cf11a0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/check-account-token-access.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,13 @@ describe('auditSource', () => {
8787
)
8888
})
8989

90-
it('exempts the token-aware modules', () => {
90+
it('exempts only the two modules that genuinely touch the table', () => {
9191
const source = 'await db.select().from(account)\nconst t = account.accessToken'
92-
expect(auditSource('apps/sim/lib/oauth/account-tokens.ts', source)).toEqual([])
9392
expect(auditSource('apps/sim/lib/oauth/credential-service.ts', source)).toEqual([])
9493
expect(auditSource('apps/sim/lib/oauth/slack.ts', source)).toEqual([])
94+
/** The accessor and crypto modules hold no queries, so they are audited like any file. */
95+
expect(auditSource('apps/sim/lib/oauth/account-tokens.ts', source)).toHaveLength(2)
96+
expect(auditSource('apps/sim/lib/oauth/account-token-crypto.ts', source)).toHaveLength(2)
9597
})
9698

9799
describe('annotation', () => {

0 commit comments

Comments
 (0)