fix(appium): enable --relaxed-security
The `relaxed-security` option should be stored in a property named `relaxedSecurityEnabled`, but it was stored in one named `relaxedSecurity`, which broke the functionality
Ref:
MODIFY
packages/appium/lib/appium-config.schema.json
packages/appium/lib/appium-config.schema.json
"default": false,
"description": "Disable additional security checks, so it is possible to use some advanced features, provided by drivers supporting this option. Only enable it if all the clients are in the trusted network and it's not the case if a client could potentially break out of the session sandbox. Specific features can be overridden by using \"deny-insecure\"",
"title": "relaxed-security config",
- "type": "boolean"
+ "type": "boolean",
+ "appiumCliDest": "relaxedSecurityEnabled"
},
"session-override": {
"default": false,

MODIFY
packages/appium/lib/schema/appium-config-schema.js
packages/appium/lib/schema/appium-config-schema.js
@@ -212,6 +212,7 @@ const schema = /** @type {const} */ ({
'Disable additional security checks, so it is possible to use some advanced features, provided by drivers supporting this option. Only enable it if all the clients are in the trusted network and it\'s not the case if a client could potentially break out of the session sandbox. Specific features can be overridden by using "deny-insecure"',
title: 'relaxed-security config',
type: 'boolean',
+ appiumCliDest: 'relaxedSecurityEnabled'
},
'session-override': {
default: false,

MODIFY
packages/appium/test/fixtures/default-args.js
packages/appium/test/fixtures/default-args.js
@@ -14,7 +14,7 @@ export default {
longStacktrace: false,
noPermsCheck: false,
port: 4723,
- relaxedSecurity: false,
+ relaxedSecurityEnabled: false,
sessionOverride: false,
strictCaps: false,
useDrivers: [],

MODIFY
packages/appium/test/fixtures/flattened-schema.js
packages/appium/test/fixtures/flattened-schema.js
@@ -399,7 +399,7 @@ export default [
argSpec: {
arg: 'relaxed-security',
defaultValue: false,
- dest: 'relaxedSecurity',
+ dest: 'relaxedSecurityEnabled',
extName: undefined,
extType: undefined,
name: 'relaxed-security',
@@ -411,6 +411,7 @@ export default [
'Disable additional security checks, so it is possible to use some advanced features, provided by drivers supporting this option. Only enable it if all the clients are in the trusted network and it\'s not the case if a client could potentially break out of the session sandbox. Specific features can be overridden by using "deny-insecure"',
title: 'relaxed-security config',
type: 'boolean',
+ appiumCliDest: 'relaxedSecurityEnabled'
},
},
{

MODIFY
packages/appium/test/parser-specs.js
packages/appium/test/parser-specs.js
@@ -125,6 +125,10 @@ describe('parser', function () {
it('should allow multiple --use-drivers', function () {
p.parse_args(['--use-drivers', 'fake,phony']).useDrivers.should.eql(['fake', 'phony']);
});
+
+ it('should respect --relaxed-security', function () {
+ p.parse_args(['--relaxed-security']).should.have.property('relaxedSecurityEnabled', true);
+ });
});
describe('extension arguments', function () {

fix(appium): enable --relaxed-security

The `relaxed-security` option should be stored in a property named `relaxedSecurityEnabled`, but it was stored in one named `relaxedSecurity`, which broke the functionality

Ref: https://github.com/appium/appium/discussions/16103#discussioncomment-1655985