Skip to content

Commit aaef95c

Browse files
authored
Merge pull request #1 from HakordiaNetwork/alert-autofix-31
Potential fix for code scanning alert no. 31: Unsafe shell command constructed from library input
2 parents c85ed14 + cc5926f commit aaef95c

File tree

1 file changed

+1
-1
lines changed
  • packages/amplify-e2e-core/src/utils

1 file changed

+1
-1
lines changed

packages/amplify-e2e-core/src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const loadFunctionTestFile = (fileName: string): string => {
7878
*/
7979
export const addNodeDependencies = (root: string, functionName: string, dependencies: string[]): void => {
8080
const indexPath = path.join(getPathToFunction(root, functionName), 'src');
81-
execa.commandSync(`yarn add ${dependencies.join(' ')}`, { cwd: indexPath });
81+
execa.sync('yarn', ['add', ...dependencies], { cwd: indexPath });
8282
};
8383

8484
/**

0 commit comments

Comments
 (0)