feat: expand secure assistant workflows
Harden runtime execution and add local knowledge, Smart Heartbeat, usage visibility, responsive product surfaces, and cross-platform packaging support. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent
6ef1795b81
commit
b3fdf96962
@@ -0,0 +1,28 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { safeToolArgumentSummary } from './approval-summary'
|
||||
|
||||
describe('safeToolArgumentSummary', () => {
|
||||
it('redacts nested sensitive fields', () => {
|
||||
expect(
|
||||
safeToolArgumentSummary({
|
||||
command: 'deploy',
|
||||
options: {
|
||||
apiKey: 'secret-value',
|
||||
nested: { authorization: 'Bearer token-value' }
|
||||
}
|
||||
})
|
||||
).toBe(
|
||||
'{"command":"deploy","options":{"apiKey":"[REDACTED]","nested":{"authorization":"[REDACTED]"}}}'
|
||||
)
|
||||
})
|
||||
|
||||
it('redacts secrets in tool previews and bounds output', () => {
|
||||
expect(
|
||||
safeToolArgumentSummary(
|
||||
{},
|
||||
[{ content: 'curl -H "Authorization: Bearer secret-token"' }],
|
||||
80
|
||||
)
|
||||
).not.toContain('secret-token')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user