mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-5987] improved security for shell scripts (#8889)
* improved security for node process functions * improved security for node process functions * remove unused file from demo shell * restore regex * fix regex * update escaping * lint fixes * fix typo * fix export * fix exports * fix lint * fix lint
This commit is contained in:
@@ -17,14 +17,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { argv } from 'node:process';
|
||||
import program from 'commander';
|
||||
import * as kube from './kube-utils';
|
||||
|
||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
||||
export default function(args: kube.KubeArgs) {
|
||||
main(args);
|
||||
}
|
||||
|
||||
const main = (args: kube.KubeArgs) => {
|
||||
program
|
||||
.version('0.1.0')
|
||||
@@ -34,9 +30,9 @@ const main = (args: kube.KubeArgs) => {
|
||||
.option('--clusterEnv [type]', 'cluster Env')
|
||||
.option('--clusterUrl [type]', 'cluster Url')
|
||||
.option('--label [type]', 'label cluster')
|
||||
.parse(process.argv);
|
||||
.parse(argv);
|
||||
|
||||
if (process.argv.includes('-h') || process.argv.includes('--help')) {
|
||||
if (argv.includes('-h') || argv.includes('--help')) {
|
||||
program.outputHelp();
|
||||
return;
|
||||
}
|
||||
@@ -49,3 +45,5 @@ const main = (args: kube.KubeArgs) => {
|
||||
kube.deletePod(args);
|
||||
}
|
||||
};
|
||||
|
||||
export default main;
|
||||
|
Reference in New Issue
Block a user