@forge/manifest 10.2.0-next.5 → 10.2.1-next.0
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.
- package/CHANGELOG.md +21 -0
- package/out/validators/modules-validators/confluence/validateMacroAutoConvert.js +1 -1
- package/out/validators/permissions-validator.d.ts +1 -0
- package/out/validators/permissions-validator.d.ts.map +1 -1
- package/out/validators/permissions-validator.js +21 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @forge/manifest
|
|
2
2
|
|
|
3
|
+
## 10.2.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 10c0bc6: Add egress support for custom URL schemes. Allow custom custom URL schemes as autoconvert patterns.
|
|
8
|
+
|
|
9
|
+
## 10.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 5144b15: Adding validation for undefined actions under automation:actionProvider module
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 5069c3c: Forge manifest linter now includes devops:developmentInfoProvider, devops:featureFlagInfoProvider, devops:deploymentInfoProvider, devops:buildInfoProvider, and devops:remoteLinkInfoProvider
|
|
18
|
+
- 8e9a8b5: Got rid of FG
|
|
19
|
+
- 5bfa872: Update manifest definitions
|
|
20
|
+
- 13e5daa: Update manifest definitions
|
|
21
|
+
- e029de1: Update manifest definitions
|
|
22
|
+
- 426dfe1: Update manifest definitions
|
|
23
|
+
|
|
3
24
|
## 10.2.0-next.5
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.validateMacroAutoConvert = void 0;
|
|
4
4
|
const text_1 = require("../../../text");
|
|
5
5
|
const utils_1 = require("../../../utils");
|
|
6
|
-
const VALID_MATCHER_PATTERN = new RegExp(/^(?=.{1,1024}$)
|
|
6
|
+
const VALID_MATCHER_PATTERN = new RegExp(/^(?=.{1,1024}$)[a-zA-Z]+:(\/\/)?(\\\\)?(?:[a-zA-Z0-9-\*]+[\.:])*[a-zA-Z0-9-\*]+(?:\.:[a-zA-Z\*]{1,})?(?:\/.*)?$/);
|
|
7
7
|
const errorMessages = text_1.errors.modules.confluence.autoConvert;
|
|
8
8
|
const mapToAutoConvertError = (validationErrors, moduleKey) => validationErrors.map((message) => ({ moduleKey, message }));
|
|
9
9
|
const validateEmpty = (matchers, moduleKey) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ManifestObject, ManifestValidationResult } from '../types';
|
|
2
2
|
import { ManifestSchema } from '../schema/manifest';
|
|
3
3
|
import { ValidatorInterface } from './validator-interface';
|
|
4
|
+
export declare const PROTOCOL_BLOCKLIST: string[];
|
|
4
5
|
export declare class PermissionsValidator implements ValidatorInterface<ManifestObject<ManifestSchema> | undefined, ManifestSchema> {
|
|
5
6
|
private isValidURL;
|
|
6
7
|
private isValidHash;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions-validator.d.ts","sourceRoot":"","sources":["../../src/validators/permissions-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAU,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAO3D,qBAAa,oBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,UAAU;
|
|
1
|
+
{"version":3,"file":"permissions-validator.d.ts","sourceRoot":"","sources":["../../src/validators/permissions-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAU,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAO3D,eAAO,MAAM,kBAAkB,UAa9B,CAAC;AAEF,qBAAa,oBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,UAAU;IAwClB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,8BAA8B;IA6ChC,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CA+JrD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PermissionsValidator = void 0;
|
|
3
|
+
exports.PermissionsValidator = exports.PROTOCOL_BLOCKLIST = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
6
|
const text_1 = require("../text");
|
|
@@ -9,6 +9,20 @@ const url_1 = require("url");
|
|
|
9
9
|
const shipyard_scopes_json_1 = tslib_1.__importDefault(require("../scopes/shipyard-scopes.json"));
|
|
10
10
|
const deprecated_shipyard_scopes_json_1 = tslib_1.__importDefault(require("../scopes/deprecated-shipyard-scopes.json"));
|
|
11
11
|
const scopes_1 = require("../utils/scopes");
|
|
12
|
+
exports.PROTOCOL_BLOCKLIST = [
|
|
13
|
+
'javascript:',
|
|
14
|
+
'data:',
|
|
15
|
+
'vbscript:',
|
|
16
|
+
'view-source:',
|
|
17
|
+
'resource:',
|
|
18
|
+
'about:',
|
|
19
|
+
'chrome:',
|
|
20
|
+
'livescript:',
|
|
21
|
+
'mocha:',
|
|
22
|
+
'file:',
|
|
23
|
+
'mhtml:',
|
|
24
|
+
'smb:'
|
|
25
|
+
];
|
|
12
26
|
class PermissionsValidator {
|
|
13
27
|
isValidURL(inputURL) {
|
|
14
28
|
const protocolRegex = /^(.*?:\/\/)/;
|
|
@@ -21,6 +35,12 @@ class PermissionsValidator {
|
|
|
21
35
|
if (inputURL === '*') {
|
|
22
36
|
return true;
|
|
23
37
|
}
|
|
38
|
+
const customURLSchemeRegex = /^[a-zA-Z]+:(\\\\)?/;
|
|
39
|
+
if (customURLSchemeRegex.test(inputURL) &&
|
|
40
|
+
![...exports.PROTOCOL_BLOCKLIST, 'http'].some((protocol) => inputURL.startsWith(protocol)) &&
|
|
41
|
+
!allowedProtocols.some((protocol) => inputURL.startsWith(protocol))) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
24
44
|
if (!inputURL.includes('.') || inputURL.includes(' ')) {
|
|
25
45
|
return false;
|
|
26
46
|
}
|