()
| 84 | } |
| 85 | |
| 86 | function sensitiveHubBody() { |
| 87 | return { |
| 88 | raw: { |
| 89 | nodeSecret: 'f'.repeat(64), |
| 90 | bearer: 'Bearer ' + 'g'.repeat(64), |
| 91 | token: 'tok_' + 'h'.repeat(40), |
| 92 | envPath: '.env.local', |
| 93 | }, |
| 94 | json() { |
| 95 | return JSON.stringify({ |
| 96 | error: 'node_secret_invalid', |
| 97 | node_secret: this.raw.nodeSecret, |
| 98 | token: this.raw.token, |
| 99 | detail: `${this.raw.bearer} from ${this.raw.envPath}`, |
| 100 | }); |
| 101 | }, |
| 102 | }; |
| 103 | } |
| 104 | |
| 105 | function assertNoRawHubBodySecrets(text, raw) { |
| 106 | assert.equal(text.includes(raw.nodeSecret), false, 'raw node_secret value must not be surfaced'); |
no outgoing calls
no test coverage detected