Skip to content

Commit

Permalink
Security Work Order Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
“v_kkhuang” committed Nov 14, 2024
1 parent cfd0054 commit 97e0fa0
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ public static Boolean checkModuleIsExistEnv(String module) {
logger.info("get pip3 list error", e);
}
try {
if (module == null || !module.matches("^[a-zA-Z][a-zA-Z0-9_.-]{0,49}$")) {
throw new IllegalArgumentException("Invalid module name: " + module);
}
String exec =
Utils.exec(
(new String[] {
Expand Down

0 comments on commit 97e0fa0

Please sign in to comment.