@activepieces/piece-intruder 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/package.json +16 -0
  2. package/src/index.d.ts +2 -0
  3. package/src/index.d.ts.map +1 -0
  4. package/src/index.js +40 -0
  5. package/src/index.js.map +1 -0
  6. package/src/lib/actions/add-target.d.ts +5 -0
  7. package/src/lib/actions/add-target.d.ts.map +1 -0
  8. package/src/lib/actions/add-target.js +39 -0
  9. package/src/lib/actions/add-target.js.map +1 -0
  10. package/src/lib/actions/search-for-a-target.d.ts +4 -0
  11. package/src/lib/actions/search-for-a-target.d.ts.map +1 -0
  12. package/src/lib/actions/search-for-a-target.js +28 -0
  13. package/src/lib/actions/search-for-a-target.js.map +1 -0
  14. package/src/lib/actions/search-for-an-issue-occurrence.d.ts +5 -0
  15. package/src/lib/actions/search-for-an-issue-occurrence.d.ts.map +1 -0
  16. package/src/lib/actions/search-for-an-issue-occurrence.js +37 -0
  17. package/src/lib/actions/search-for-an-issue-occurrence.js.map +1 -0
  18. package/src/lib/actions/search-for-an-issue.d.ts +8 -0
  19. package/src/lib/actions/search-for-an-issue.d.ts.map +1 -0
  20. package/src/lib/actions/search-for-an-issue.js +81 -0
  21. package/src/lib/actions/search-for-an-issue.js.map +1 -0
  22. package/src/lib/actions/start-scan.d.ts +5 -0
  23. package/src/lib/actions/start-scan.d.ts.map +1 -0
  24. package/src/lib/actions/start-scan.js +40 -0
  25. package/src/lib/actions/start-scan.js.map +1 -0
  26. package/src/lib/common/auth.d.ts +2 -0
  27. package/src/lib/common/auth.d.ts.map +1 -0
  28. package/src/lib/common/auth.js +27 -0
  29. package/src/lib/common/auth.js.map +1 -0
  30. package/src/lib/common/client.d.ts +4 -0
  31. package/src/lib/common/client.d.ts.map +1 -0
  32. package/src/lib/common/client.js +28 -0
  33. package/src/lib/common/client.js.map +1 -0
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "@activepieces/piece-intruder",
3
+ "version": "0.0.1",
4
+ "main": "./src/index.js",
5
+ "types": "./src/index.d.ts",
6
+ "dependencies": {
7
+ "@activepieces/pieces-common": "0.12.0",
8
+ "@activepieces/pieces-framework": "0.26.0",
9
+ "@activepieces/shared": "0.46.0",
10
+ "tslib": "2.6.2"
11
+ },
12
+ "scripts": {
13
+ "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
14
+ "lint": "eslint 'src/**/*.ts'"
15
+ }
16
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare const intruder: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,QAAQ,mHAwBnB,CAAC"}
package/src/index.js ADDED
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.intruder = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const add_target_1 = require("./lib/actions/add-target");
7
+ const start_scan_1 = require("./lib/actions/start-scan");
8
+ const auth_1 = require("./lib/common/auth");
9
+ const search_for_a_target_1 = require("./lib/actions/search-for-a-target");
10
+ const search_for_an_issue_1 = require("./lib/actions/search-for-an-issue");
11
+ const search_for_an_issue_occurrence_1 = require("./lib/actions/search-for-an-issue-occurrence");
12
+ const pieces_common_1 = require("@activepieces/pieces-common");
13
+ const shared_1 = require("@activepieces/shared");
14
+ exports.intruder = (0, pieces_framework_1.createPiece)({
15
+ displayName: 'Intruder',
16
+ auth: auth_1.intruderAuth,
17
+ minimumSupportedRelease: '0.36.1',
18
+ logoUrl: 'https://cdn.activepieces.com/pieces/intruder.png',
19
+ authors: ['sanket-a11y'],
20
+ categories: [shared_1.PieceCategory.DEVELOPER_TOOLS],
21
+ description: ' Intruder is a powerful vulnerability management platform that helps businesses identify, assess, and remediate security risks across their digital assets. With its comprehensive scanning capabilities and user-friendly interface, Intruder enables organizations to stay ahead of potential threats and maintain a robust security posture.',
22
+ actions: [
23
+ add_target_1.addTarget,
24
+ start_scan_1.startScan,
25
+ search_for_a_target_1.searchForATarget,
26
+ search_for_an_issue_1.searchForAnIssue,
27
+ search_for_an_issue_occurrence_1.searchForAnIssueOccurrence,
28
+ (0, pieces_common_1.createCustomApiCallAction)({
29
+ auth: auth_1.intruderAuth,
30
+ baseUrl: () => 'https://api.intruder.io/v1',
31
+ authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
32
+ return ({
33
+ Authorization: `Bearer ${auth.secret_text}`,
34
+ });
35
+ }),
36
+ }),
37
+ ],
38
+ triggers: [],
39
+ });
40
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,yDAAqD;AACrD,yDAAqD;AACrD,4CAAiD;AACjD,2EAAqE;AACrE,2EAAqE;AACrE,iGAA0F;AAC1F,+DAAwE;AACxE,iDAAqD;AAExC,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IAClC,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,mBAAY;IAClB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,kDAAkD;IAC3D,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,UAAU,EAAE,CAAC,sBAAa,CAAC,eAAe,CAAC;IAC3C,WAAW,EACT,iVAAiV;IACnV,OAAO,EAAE;QACP,sBAAS;QACT,sBAAS;QACT,sCAAgB;QAChB,sCAAgB;QAChB,2DAA0B;QAC1B,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,mBAAY;YAClB,OAAO,EAAE,GAAG,EAAE,CAAC,4BAA4B;YAC3C,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;iBAC5C,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const addTarget: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ address: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ tags: import("@activepieces/pieces-framework").ArrayProperty<false>;
4
+ }>;
5
+ //# sourceMappingURL=add-target.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-target.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-target.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;EAwCpB,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addTarget = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ exports.addTarget = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.intruderAuth,
11
+ name: 'addTarget',
12
+ displayName: 'Add Target',
13
+ description: 'Add a new target to your Intruder account',
14
+ props: {
15
+ address: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Target Address',
17
+ description: 'The address or domain of the target (e.g., example.com, 192.168.1.1)',
18
+ required: true,
19
+ }),
20
+ tags: pieces_framework_1.Property.Array({
21
+ displayName: 'Tags',
22
+ description: 'Tags to organize and filter targets',
23
+ required: false,
24
+ }),
25
+ },
26
+ run(_a) {
27
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
28
+ const body = {
29
+ address: propsValue.address,
30
+ };
31
+ if (propsValue.tags && propsValue.tags.length > 0) {
32
+ body.tags = propsValue.tags;
33
+ }
34
+ const response = yield (0, client_1.makeRequest)(auth.secret_text, pieces_common_1.HttpMethod.POST, '/targets/', body);
35
+ return response;
36
+ });
37
+ },
38
+ });
39
+ //# sourceMappingURL=add-target.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-target.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-target.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA8C;AAC9C,6CAA+C;AAC/C,+DAAyD;AAE5C,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,2CAA2C;IACxD,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EACT,sEAAsE;YACxE,QAAQ,EAAE,IAAI;SACf,CAAC;QAEF,IAAI,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACnB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,IAAI,GAGN;gBACF,OAAO,EAAE,UAAU,CAAC,OAAO;aAC5B,CAAC;YAEF,IAAI,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAClD,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAgB,CAAC;YAC1C,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,IAAI,CAAC,WAAW,EAChB,0BAAU,CAAC,IAAI,EACf,WAAW,EACX,IAAI,CACL,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const searchForATarget: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ address: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ }>;
4
+ //# sourceMappingURL=search-for-a-target.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-for-a-target.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-for-a-target.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;;EAsB3B,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchForATarget = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ exports.searchForATarget = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.intruderAuth,
11
+ name: 'searchForATarget',
12
+ displayName: 'Search For a Target',
13
+ description: 'Search for targets by address',
14
+ props: {
15
+ address: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Target Address',
17
+ description: 'The address or domain to search for (e.g., example.com, 192.168.1.1)',
18
+ required: true,
19
+ }),
20
+ },
21
+ run(_a) {
22
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
23
+ const response = yield (0, client_1.makeRequest)(auth.secret_text, pieces_common_1.HttpMethod.GET, `/targets/?address=${encodeURIComponent(propsValue.address)}`);
24
+ return response;
25
+ });
26
+ },
27
+ });
28
+ //# sourceMappingURL=search-for-a-target.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-for-a-target.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-for-a-target.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA8C;AAC9C,6CAA+C;AAC/C,+DAAyD;AAE5C,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,+BAA+B;IAC5C,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EACT,sEAAsE;YACxE,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,IAAI,CAAC,WAAW,EAChB,0BAAU,CAAC,GAAG,EACd,qBAAqB,kBAAkB,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAC9D,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const searchForAnIssueOccurrence: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ issueId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ snoozed: import("@activepieces/pieces-framework").CheckboxProperty<false>;
4
+ }>;
5
+ //# sourceMappingURL=search-for-an-issue-occurrence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-for-an-issue-occurrence.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-for-an-issue-occurrence.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,0BAA0B;;;EA6BrC,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchForAnIssueOccurrence = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ exports.searchForAnIssueOccurrence = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.intruderAuth,
11
+ name: 'searchForAnIssueOccurrence',
12
+ displayName: 'Search For an Issue Occurrence',
13
+ description: 'Search for occurrences of an issue by ID with optional snoozed filter',
14
+ props: {
15
+ issueId: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Issue ID',
17
+ description: 'The ID of the issue to search for occurrences',
18
+ required: true,
19
+ }),
20
+ snoozed: pieces_framework_1.Property.Checkbox({
21
+ displayName: 'Snoozed',
22
+ description: 'Filter for snoozed occurrences',
23
+ required: false,
24
+ }),
25
+ },
26
+ run(_a) {
27
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
28
+ let url = `/issues/${encodeURIComponent(propsValue.issueId)}/occurrences/`;
29
+ if (propsValue.snoozed !== undefined && propsValue.snoozed !== null) {
30
+ url += `?snoozed=${propsValue.snoozed}`;
31
+ }
32
+ const response = yield (0, client_1.makeRequest)(auth.secret_text, pieces_common_1.HttpMethod.GET, url);
33
+ return response;
34
+ });
35
+ },
36
+ });
37
+ //# sourceMappingURL=search-for-an-issue-occurrence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-for-an-issue-occurrence.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-for-an-issue-occurrence.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA8C;AAC9C,6CAA+C;AAC/C,+DAAyD;AAE5C,QAAA,0BAA0B,GAAG,IAAA,+BAAY,EAAC;IACrD,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,gCAAgC;IAC7C,WAAW,EACT,uEAAuE;IACzE,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,IAAI,GAAG,GAAG,WAAW,kBAAkB,CAAC,UAAU,CAAC,OAAO,CAAC,eAAe,CAAC;YAE3E,IAAI,UAAU,CAAC,OAAO,KAAK,SAAS,IAAI,UAAU,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;gBACpE,GAAG,IAAI,YAAY,UAAU,CAAC,OAAO,EAAE,CAAC;YAC1C,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,WAAW,EAAE,0BAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAE1E,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const searchForAnIssue: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ issueIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
3
+ targetAddresses: import("@activepieces/pieces-framework").ArrayProperty<false>;
4
+ tagNames: import("@activepieces/pieces-framework").ArrayProperty<false>;
5
+ severity: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
6
+ snoozed: import("@activepieces/pieces-framework").CheckboxProperty<false>;
7
+ }>;
8
+ //# sourceMappingURL=search-for-an-issue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-for-an-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-for-an-issue.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;;;;;;EAiF3B,CAAC"}
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchForAnIssue = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ exports.searchForAnIssue = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.intruderAuth,
11
+ name: 'searchForAnIssue',
12
+ displayName: 'Search For an Issue',
13
+ description: 'Search for issues with optional filters',
14
+ props: {
15
+ issueIds: pieces_framework_1.Property.Array({
16
+ displayName: 'Issue IDs',
17
+ description: 'Filter by specific issue IDs',
18
+ required: false,
19
+ }),
20
+ targetAddresses: pieces_framework_1.Property.Array({
21
+ displayName: 'Target Addresses',
22
+ description: 'Filter by target addresses (e.g., example.com, 192.168.1.1)',
23
+ required: false,
24
+ }),
25
+ tagNames: pieces_framework_1.Property.Array({
26
+ displayName: 'Tag Names',
27
+ description: 'Filter by tag names',
28
+ required: false,
29
+ }),
30
+ severity: pieces_framework_1.Property.StaticDropdown({
31
+ displayName: 'Severity',
32
+ description: 'Filter by severity level',
33
+ required: false,
34
+ options: {
35
+ disabled: false,
36
+ options: [
37
+ { label: 'Low', value: 'low' },
38
+ { label: 'Medium', value: 'medium' },
39
+ { label: 'High', value: 'high' },
40
+ { label: 'Critical', value: 'critical' },
41
+ ],
42
+ },
43
+ }),
44
+ snoozed: pieces_framework_1.Property.Checkbox({
45
+ displayName: 'Snoozed',
46
+ description: 'Filter for snoozed issues',
47
+ required: false,
48
+ }),
49
+ },
50
+ run(_a) {
51
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
52
+ const params = new URLSearchParams();
53
+ if (propsValue.issueIds && propsValue.issueIds.length > 0) {
54
+ propsValue.issueIds.forEach((id) => {
55
+ params.append('issue_ids', String(id));
56
+ });
57
+ }
58
+ if (propsValue.targetAddresses && propsValue.targetAddresses.length > 0) {
59
+ propsValue.targetAddresses.forEach((address) => {
60
+ params.append('target_addresses', String(address));
61
+ });
62
+ }
63
+ if (propsValue.tagNames && propsValue.tagNames.length > 0) {
64
+ propsValue.tagNames.forEach((tag) => {
65
+ params.append('tag_names', String(tag));
66
+ });
67
+ }
68
+ if (propsValue.severity) {
69
+ params.append('severity', propsValue.severity);
70
+ }
71
+ if (propsValue.snoozed !== undefined && propsValue.snoozed !== null) {
72
+ params.append('snoozed', String(propsValue.snoozed));
73
+ }
74
+ const queryString = params.toString();
75
+ const url = `/issues/${queryString ? '?' + queryString : ''}`;
76
+ const response = yield (0, client_1.makeRequest)(auth.secret_text, pieces_common_1.HttpMethod.GET, url);
77
+ return response;
78
+ });
79
+ },
80
+ });
81
+ //# sourceMappingURL=search-for-an-issue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-for-an-issue.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-for-an-issue.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,5 @@
1
+ export declare const startScan: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ target_addresses: import("@activepieces/pieces-framework").ArrayProperty<false>;
3
+ tag_names: import("@activepieces/pieces-framework").ArrayProperty<false>;
4
+ }>;
5
+ //# sourceMappingURL=start-scan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-scan.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/start-scan.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;EA2CpB,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.startScan = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ exports.startScan = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.intruderAuth,
11
+ name: 'startScan',
12
+ displayName: 'Start Scan',
13
+ description: 'Start a new scan. Optionally specify target addresses and/or tag names. If no targets or tags are provided, the scan will run on all targets.',
14
+ props: {
15
+ target_addresses: pieces_framework_1.Property.Array({
16
+ displayName: 'Target Addresses',
17
+ description: 'Target addresses to scan (e.g., example.com, 192.168.1.1). Leave empty to scan all targets.',
18
+ required: false,
19
+ }),
20
+ tag_names: pieces_framework_1.Property.Array({
21
+ displayName: 'Tag Names',
22
+ description: 'Tag names to filter targets. Leave empty to scan all targets.',
23
+ required: false,
24
+ }),
25
+ },
26
+ run(_a) {
27
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
28
+ const body = {};
29
+ if (propsValue.target_addresses && propsValue.target_addresses.length > 0) {
30
+ body.target_addresses = propsValue.target_addresses;
31
+ }
32
+ if (propsValue.tag_names && propsValue.tag_names.length > 0) {
33
+ body.tag_names = propsValue.tag_names;
34
+ }
35
+ const response = yield (0, client_1.makeRequest)(auth.secret_text, pieces_common_1.HttpMethod.POST, '/scans/', Object.keys(body).length > 0 ? body : undefined);
36
+ return response;
37
+ });
38
+ },
39
+ });
40
+ //# sourceMappingURL=start-scan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-scan.js","sourceRoot":"","sources":["../../../../src/lib/actions/start-scan.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA8C;AAC9C,6CAA+C;AAC/C,+DAAyD;AAE5C,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,YAAY;IACzB,WAAW,EACT,+IAA+I;IACjJ,KAAK,EAAE;QACL,gBAAgB,EAAE,2BAAQ,CAAC,KAAK,CAAC;YAC/B,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EACT,6FAA6F;YAC/F,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACxB,WAAW,EAAE,WAAW;YACxB,WAAW,EACT,+DAA+D;YACjE,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,IAAI,GAGN,EAAE,CAAC;YAEP,IAAI,UAAU,CAAC,gBAAgB,IAAI,UAAU,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC1E,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAA4B,CAAC;YAClE,CAAC;YAED,IAAI,UAAU,CAAC,SAAS,IAAI,UAAU,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5D,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAqB,CAAC;YACpD,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,IAAI,CAAC,WAAW,EAChB,0BAAU,CAAC,IAAI,EACf,SAAS,EACT,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAChD,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const intruderAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
2
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/auth.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,mEAkBvB,CAAC"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.intruderAuth = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const client_1 = require("./client");
7
+ const pieces_common_1 = require("@activepieces/pieces-common");
8
+ exports.intruderAuth = pieces_framework_1.PieceAuth.SecretText({
9
+ displayName: 'Intruder API Key',
10
+ description: 'API Key for Intruder. Get it from your Intruder account.',
11
+ required: true,
12
+ validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
13
+ try {
14
+ yield (0, client_1.makeRequest)(auth, pieces_common_1.HttpMethod.GET, '/health');
15
+ return {
16
+ valid: true,
17
+ };
18
+ }
19
+ catch (err) {
20
+ return {
21
+ valid: false,
22
+ error: 'Connection failed. Please check your credentials and try again.',
23
+ };
24
+ }
25
+ }),
26
+ });
27
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../src/lib/common/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAA2D;AAC3D,qCAAuC;AACvC,+DAAyD;AAE5C,QAAA,YAAY,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC/C,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,0DAA0D;IACvE,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,IAAA,oBAAW,EAAC,IAAI,EAAE,0BAAU,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;YACnD,OAAO;gBACL,KAAK,EAAE,IAAI;aACZ,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EACH,iEAAiE;aACpE,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { HttpMethod } from '@activepieces/pieces-common';
2
+ export declare const BASE_URL = "https://api.intruder.io/v1";
3
+ export declare function makeRequest(access_token: string, method: HttpMethod, path: string, body?: unknown): Promise<any>;
4
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAc,MAAM,6BAA6B,CAAC;AAErE,eAAO,MAAM,QAAQ,+BAA+B,CAAC;AAErD,wBAAsB,WAAW,CAC/B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,gBAiBf"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BASE_URL = void 0;
4
+ exports.makeRequest = makeRequest;
5
+ const tslib_1 = require("tslib");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ exports.BASE_URL = `https://api.intruder.io/v1`;
8
+ function makeRequest(access_token, method, path, body) {
9
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
+ try {
11
+ const url = `${exports.BASE_URL}${path}`;
12
+ const response = yield pieces_common_1.httpClient.sendRequest({
13
+ method,
14
+ url,
15
+ headers: {
16
+ Authorization: `Bearer ${access_token}`,
17
+ 'Content-Type': 'application/json',
18
+ },
19
+ body,
20
+ });
21
+ return response.body;
22
+ }
23
+ catch (error) {
24
+ throw new Error(`Unexpected error: ${error.message || String(error)}`);
25
+ }
26
+ });
27
+ }
28
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/lib/common/client.ts"],"names":[],"mappings":";;;AAIA,kCAqBC;;AAzBD,+DAAqE;AAExD,QAAA,QAAQ,GAAG,4BAA4B,CAAC;AAErD,SAAsB,WAAW,CAC/B,YAAoB,EACpB,MAAkB,EAClB,IAAY,EACZ,IAAc;;QAEd,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,GAAG,gBAAQ,GAAG,IAAI,EAAE,CAAC;YACjC,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM;gBACN,GAAG;gBACH,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,YAAY,EAAE;oBACvC,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI;aACL,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,qBAAqB,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;CAAA"}