1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "urls": [
12 "https://example.com/",
13 "https://www.iana.org/"
14 ],
15 "ownershipConfirmed": true,
16 "scanBundles": true,
17 "maxBundleBytes": 2000000,
18 "maxScriptsPerPage": 10,
19 "probePaths": [
20 "/.env",
21 "/.env.local",
22 "/.git/config",
23 "/actuator/env",
24 "/debug/vars",
25 "/swagger.json",
26 "/openapi.json",
27 "/api-docs",
28 "/swagger-ui.html",
29 "/graphql",
30 "/graphiql",
31 "/server-status"
32 ],
33 "failOn": "high",
34 "timeoutSeconds": 15,
35 "maxRequests": 400,
36 "maxRedirects": 2,
37 "trackBaseline": false,
38 "baselineKey": "baseline"
39};
40
41
42const run = await client.actor("kingii98/deployed-frontend-secret-and-debug-endpoint-exposure-gate").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52