Skip to content

Commit cc5926f

Browse files
Potential fix for code scanning alert no. 31: Unsafe shell command constructed from library input
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent c85ed14 commit cc5926f

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)