http-mocking
Enforces HTTP mocking best practices using the nock library for accurate API testing and response simulation.
Install this skill
Security score
The http-mocking skill was audited on Feb 12, 2026 and we found 32 security issues across 3 threat categories. Review the findings below before installing.
Categories Tested
Security Issues
Template literal with variable interpolation in command context
| 155 | .get(`/repos/${owner}/${repo}/hooks`) |
Webhook reference - potential data exfiltration
| 30 | describe('WebhookProducer', () => { |
Webhook reference - potential data exfiltration
| 35 | it('should list webhooks successfully', async () => { |
Webhook reference - potential data exfiltration
| 46 | url: 'https://example.com/webhook', |
Webhook reference - potential data exfiltration
| 54 | const producer = new WebhookProducer(httpClient); |
Webhook reference - potential data exfiltration
| 55 | const webhooks = await producer.list('octocat', 'Hello-World'); |
Webhook reference - potential data exfiltration
| 58 | expect(webhooks).toHaveLength(1); |
Webhook reference - potential data exfiltration
| 59 | expect(webhooks[0].id).toBeDefined(); |
Webhook reference - potential data exfiltration
| 101 | it('should create webhook', async () => { |
Webhook reference - potential data exfiltration
| 105 | url: 'https://example.com/webhook', |
Webhook reference - potential data exfiltration
| 120 | const webhook = await producer.create('octocat', 'Hello-World', config); |
Webhook reference - potential data exfiltration
| 122 | expect(webhook.id).toBeDefined(); |
Webhook reference - potential data exfiltration
| 139 | // test/fixtures/webhookMocks.ts |
Webhook reference - potential data exfiltration
| 140 | export const mockWebhookResponse = { |
Webhook reference - potential data exfiltration
| 146 | url: 'https://example.com/webhook', |
Webhook reference - potential data exfiltration
| 153 | export function mockListWebhooks(owner: string, repo: string, data: any[]) { |
Webhook reference - potential data exfiltration
| 186 | jest.mock('./WebhookProducer'); |
Webhook reference - potential data exfiltration
| 238 | .reply(200, [mockWebhookResponse]); |
Webhook reference - potential data exfiltration
| 245 | .reply(200, mockWebhookResponse); |
External URL reference
| 37 | nock('https://api.github.com') |
External URL reference
| 46 | url: 'https://example.com/webhook', |
External URL reference
| 68 | nock('https://api.github.com', { |
External URL reference
| 82 | nock('https://api.github.com') |
External URL reference
| 105 | url: 'https://example.com/webhook', |
External URL reference
| 112 | nock('https://api.github.com') |
External URL reference
| 130 | nock('https://api.github.com') |
External URL reference
| 146 | url: 'https://example.com/webhook', |
External URL reference
| 154 | return nock('https://api.github.com') |
External URL reference
| 215 | nock('https://api.github.com') |
External URL reference
| 236 | nock('https://api.github.com') |
External URL reference
| 243 | nock('https://api.github.com') |
External URL reference
| 250 | nock('https://api.github.com') |