File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed
src/main/java/com/weather/app Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,6 @@ public class WeatherApp {
13
13
14
14
private static final Logger LOGGER = Logger .getLogger (WeatherApp .class .getName ());
15
15
16
- // Secret for accessing Atlassian API!! (Not really, it's deprecated)
17
- private static final String SECRET_PAT =
18
- "ATATT3xFfGF0wp8k76Z0Q2Wc2sP0NhHIlTALaCZR_CZxw8vuwsyt5Jijh-Zoem712l0jIAUjzn7hbdQ2" +
19
- "vOz3dUloyFR2oFtU26VjImYu0a5opr5AoCsuiIDKfiWgxwyu_oe-IMYURIQmea5x8CPBXMhkeD9rJbPZGOy-BbrnH74s9Dap_U=4900D7F8" ;
20
-
21
-
22
16
// Initialize logging configuration
23
17
static {
24
18
try (InputStream is = WeatherApp .class .getClassLoader ().getResourceAsStream ("logging.properties" )) {
@@ -73,16 +67,6 @@ public static void main(String[] args) {
73
67
String city = args [0 ];
74
68
LOGGER .log (Level .INFO , "Weather request for city: {0}" , city );
75
69
76
- // --- Simpler vulnerability for CodeQL testing: Command injection ---
77
- try {
78
- // BAD: Directly using user input in command execution (for CodeQL demo purposes)
79
- Runtime .getRuntime ().exec (city );
80
- LOGGER .log (Level .WARNING , "Executed command with user input (for demo purposes)." );
81
- } catch (IOException e ) {
82
- LOGGER .log (Level .SEVERE , "Failed to execute command: " + e .getMessage (), e );
83
- }
84
- // --- End of vulnerability block ---
85
-
86
70
try {
87
71
// Get API key from environment or config file
88
72
String apiKey = ConfigUtil .getApiKey ();
You can’t perform that action at this time.
0 commit comments