Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
7776701
Add base image for Java benchmarks on OpenWhisk
mahlashrifi Sep 8, 2024
13aa9ec
Add Dockerfile for running Java benchmarks on OpenWhisk
mahlashrifi Sep 8, 2024
b026577
Update base image of java on OpenWhisk
mahlashrifi Sep 8, 2024
d478dc1
Add Java-based handler for OpenWhisk
mahlashrifi Sep 10, 2024
d36481c
Add example config file for running java benchmarks on OpenWhisk
mahlashrifi Sep 19, 2024
a7055e1
Add JAVA enum to list of languages
mahlashrifi Sep 19, 2024
cdd1763
Add config of 601.hello-world (A simple java benchmark)
mahlashrifi Sep 19, 2024
e9b72b2
Init maven structure of 601.hello-world and add some codes for runnin…
mahlashrifi Sep 19, 2024
8d2e015
Sync hello-world maven paroject with the wrapper of openwhisk
mahlashrifi Sep 19, 2024
8dcddef
Example config file for running 601.hello-world on openwhisk
mahlashrifi Sep 23, 2024
b6c8bb7
Correct Structure of maven project in 601.hello-world benchmark
mahlashrifi Sep 23, 2024
3032978
Expand add_code functions for maven java rojects
mahlashrifi Sep 23, 2024
32235f5
Exclude Java main wrapper from Docker directory created in runtimes.
mahlashrifi Sep 23, 2024
7f8eb2f
Fix a big
mahlashrifi Sep 25, 2024
67bb80c
Add required changes from PR222 to enable benchmarking of java codes.
mahlashrifi Mar 15, 2025
19c572d
Fix bug: Java simple benchmark (601.hello_world) now works correctly
mahlashrifi Mar 18, 2025
ab2bc2d
Use language enum instead of hardcoded 'java'
mahlashrifi Mar 18, 2025
37c37ae
Remove unused parts from the Java benchmarks wrapper for OpenWhisk.
mahlashrifi Mar 18, 2025
601903f
Change the directory where the file is created in container for detec…
mahlashrifi Mar 19, 2025
2c59db1
Add Java wrapper for AWS Lambda benchmarks
mahlashrifi May 4, 2025
726e07a
Add the nosql_func argument to the signature of generate_input
mahlashrifi May 10, 2025
4f88a8d
Update hello_world benchmark input/output) for platform-independence
mahlashrifi May 10, 2025
139cf29
Update system.json for Java on AWS
mahlashrifi May 10, 2025
b1a0a0f
Platform-related dependencies for Java benchmarks are now added dynam…
mahlashrifi May 10, 2025
5625faf
Add dockefile and installer for java on AWS
mahlashrifi May 14, 2025
f784af3
Adopt the output dir of Java wrappers for compatibility with Maven's …
mahlashrifi May 14, 2025
e7fad85
Update hashing to adapt to Java benchmark directory structure
mahlashrifi May 14, 2025
f1796c1
Java HelloWorld benchmark now runs on AWS (requires enhancement)
mahlashrifi May 17, 2025
82d04fa
Merge branch 'master' into java_benchmarks_support
mcopik Jan 17, 2026
a66fda7
Add Java runtime support for AWS Lambda and Azure Functions
xSurus Dec 11, 2025
8ed60e1
[java] Ensure that failed invocations are not reported as success
mcopik Mar 4, 2026
528a1d9
[aws][java] Upload the correct .jar directly
mcopik Mar 4, 2026
ebca340
[system][java] Major fixes to Java handling and exporting build error…
mcopik Mar 5, 2026
2974d2d
[docker] Ensure that Maven package is always rebuilt
mcopik Mar 5, 2026
21849d3
[dev] Linting
mcopik Mar 5, 2026
7843b6d
[java] Standardizing benchmark structure
mcopik Mar 5, 2026
14ad548
[java][aws] Unify outputs and handlers
mcopik Mar 5, 2026
106a016
[java] Unify microbenchmarks 601.hello-world and 010.sleep
mcopik Mar 5, 2026
ca127b1
[java] Downgrade maven plugin and export system-level dependencies to…
mcopik Mar 5, 2026
650a767
Merge remote-tracking branch 'origin/master' into java_benchmarks_sup…
mcopik Mar 5, 2026
c27c80e
[dev] Linting and docstrings
mcopik Mar 5, 2026
9f6dbcf
[dev] Extend linting scripts with docstring coverage
mcopik Mar 5, 2026
f5e2ee0
[system] Bump GCP requirements to work with Python 3.12
mcopik Mar 5, 2026
e616406
[system] Revert incorrect AWS setting
mcopik Mar 5, 2026
5fc5c86
Feature: Multi-language Support (Rust, PyPy, Java) & Enhanced Benchma…
xSurus Jan 8, 2026
4d9e184
Update build and deployment configurations
xSurus Jan 8, 2026
6e5ca67
[aws][java] Unify JAR names
mcopik Mar 5, 2026
b10510d
[aws][java] Update Docker base file
mcopik Mar 5, 2026
24c6bf3
[system] Remove unnecessary assertion
mcopik Mar 5, 2026
4114db1
[docs] Update list of Java-supported benchmarks
mcopik Mar 5, 2026
cbd5fec
[system] Fix base images for Java on AWS
mcopik Mar 5, 2026
a879d3a
[benchmarks] Unify Java names
mcopik Mar 5, 2026
ca27dec
[azure] Minor fix to gracefully quit when credentials are expired
mcopik Mar 5, 2026
b757773
[docs] Additional warning for creating Azure accounts
mcopik Mar 5, 2026
da68363
[aws] Simplify Java cold start tracker
mcopik Mar 5, 2026
ca4dc29
[azure] Simplify and normalize Azure wrappers for Java
mcopik Mar 5, 2026
1f6462d
[azure] Additional check for failed logins
mcopik Mar 5, 2026
d696934
[system] Update regression to correctly recognize platform capabilities
mcopik Mar 5, 2026
0ddb6c2
[dev] Linting
mcopik Mar 5, 2026
255f452
[gcp] Correct GCP build behavior - observe actual build, not just fun…
mcopik Mar 5, 2026
17ba563
[gcp] Corrected JAR upload for Java functions
mcopik Mar 5, 2026
40962a2
[gcp] Make sure we wait for deployment to finish
mcopik Mar 5, 2026
cfd7749
[gcp] Add docker images for GCP
mcopik Mar 5, 2026
51d24f1
[dev] Linting
mcopik Mar 5, 2026
b588358
[dev] Remove wrong character
mcopik Mar 5, 2026
b5d62bb
[gcp] Add wrappers for Java
mcopik Mar 5, 2026
52287f7
[whisk] Remove merge artifact
mcopik Mar 5, 2026
4c9a83f
[whisk] Add baseline Dockerfile for Java actions
mcopik Mar 5, 2026
eb9c88d
[whisk] Update definition of actions and dependencies
mcopik Mar 5, 2026
87a680c
[whisk] Add baseline implementation of wrappers
mcopik Mar 5, 2026
8f6fea4
[whisk] Update configuration
mcopik Mar 5, 2026
e4f7c50
[whisk] Support Java-based actions
mcopik Mar 5, 2026
3ae88eb
[whisk] Add dedicated cold start tracker
mcopik Mar 5, 2026
a580eae
[whisk] Make sure to pass class name when updating action
mcopik Mar 5, 2026
a25d079
[gcp] Add OpenWhisk Java to regression
mcopik Mar 5, 2026
6cdb19d
[docs] Update list of contributors
mcopik Mar 5, 2026
499153f
[java] Replace dynamic loading of function class with a statically kn…
mcopik Mar 5, 2026
20bb209
[dev] Update mypy ignores
mcopik Mar 6, 2026
d41785e
[system] Update examples
mcopik Mar 6, 2026
658d4ea
[docs] Minor fixes
mcopik Mar 6, 2026
b72edb3
[system] Bump submodule
mcopik Mar 6, 2026
611a11e
[java] Improve gathering of timestamps
mcopik Mar 6, 2026
87fc63b
[regression] Ensure Azure is logged in
mcopik Mar 6, 2026
c071f75
[system] Fix copy error
mcopik Mar 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,7 @@ cache
.idea
*.iml

# Visual Studio Code files
.vscode/
# MacOS Finder
**/.DS_Store
**/.DS_Store
3 changes: 3 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ ignore_missing_imports = True
[mypy-google.cloud.storage]
ignore_missing_imports = True

[mypy-google.cloud.devtools]
ignore_missing_imports = True

[mypy-google.api_core]
ignore_missing_imports = True

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Dynamic dependency resolution with CMake generation
- Support for Boost, OpenCV, igraph, PyTorch, hiredis libraries
- C++ implementations: 010.sleep, 210.thumbnailer, 501.graph-pagerank, 503.graph-bfs, 411.image-recognition
* **Java benchmarks**: initial support for Java on all four platforms (#223), including benchmark **110.dynamic-html**.
* **Python**: Updated support for Python 3.8, 3.9, 3.10, 3.11, 3.12
* **Node.js**: Updated support for Node.js 14, 16, 18, 20

Expand Down Expand Up @@ -104,6 +105,8 @@ This release includes contributions from:
* @lawrence910426 - Colored CLI output (#141)
* @alevy - Documentation improvements (#139)
* @skehrli - Local memory measurements (#101)
* @mahlashrifi - Java benchmarks support (#223)
* @xSurus - improvements and extensions to Java benchmarks (#223)
* And many others who contributed bug reports, testing, and feedback!

## [1.1.0](https://github.com/spcl/serverless-benchmarks/compare/v1.0...v1.1) (2022-05-30)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,5 @@ To verify the correctness of installation, you can use [our regression testing](
* [Prajin Khadka](https://github.com/prajinkhadka) - contributed new language versions, container support, and ARM builds.
* [Horia Mercan](https://github.com/HoriaMercan) - contributed new benchmarks in C++.
* [Dillon Elste (ETH Zurich)](https://github.com/DJAntivenom) - bugfixing in C++.
* [Mahla Sharifi](https://github.com/mahlashrifi) - contributed support for Java benchmarks.
* [Alexander Schlieper (ETH Zurich)](https://github.com/xSurus) - improved support for Java benchmarks.
2 changes: 1 addition & 1 deletion benchmarks/000.microbenchmarks/010.sleep/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"timeout": 120,
"memory": 128,
"languages": ["python", "nodejs", "cpp"],
"languages": ["python", "nodejs", "java", "cpp"],
"modules": []
}
60 changes: 60 additions & 0 deletions benchmarks/000.microbenchmarks/010.sleep/java/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>function</groupId>
<artifactId>benchmark</artifactId>
<version>1.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>${env.JAVA_VERSION}</java.version>
</properties>

<dependencies>
<!-- PLATFORM_DEPENDENCIES -->
</dependencies>

<build>
<finalName>function</finalName>
<plugins>
<!-- Compiler Plugin using environment-sourced version -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>

<!-- Shade plugin to build fat JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals><goal>shade</goal></goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package function;

import java.util.HashMap;
import java.util.Map;

public class Function {

public Map<String, Object> handler(Map<String, Object> event) {
double sleepSeconds = parseSeconds(event.get("sleep"));
try {
Thread.sleep((long) (sleepSeconds * 1000));
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
Map<String, Object> result = new HashMap<>();
result.put("result", sleepSeconds);
return result;
}

private double parseSeconds(Object value) {
if (value instanceof Number) {
return ((Number) value).doubleValue();
}
if (value instanceof String) {
try {
return Double.parseDouble((String) value);
} catch (NumberFormatException ignored) {
return 0;
}
}
return 0;
}
}
2 changes: 1 addition & 1 deletion benchmarks/100.webapps/110.dynamic-html/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"timeout": 10,
"memory": 128,
"languages": ["python", "nodejs"],
"languages": ["python", "nodejs", "java"],
"modules": []
}
6 changes: 6 additions & 0 deletions benchmarks/100.webapps/110.dynamic-html/java/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

OUTPUT_DIR=$1

# Copy templates directory to the output directory
cp -r templates "$OUTPUT_DIR/"
79 changes: 79 additions & 0 deletions benchmarks/100.webapps/110.dynamic-html/java/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>function</groupId>
<artifactId>benchmark</artifactId>
<version>1.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>${env.JAVA_VERSION}</java.version>
</properties>
<dependencies>
<!-- Mustache templating engine -->
<dependency>
<groupId>com.github.spullara.mustache.java</groupId>
<artifactId>compiler</artifactId>
<version>0.9.10</version>
</dependency>
<!-- PLATFORM_DEPENDENCIES -->
</dependencies>
<build>
<!-- Force rebuild for Architecture fix -->
<finalName>function</finalName>
<resources>
<resource>
<directory>${project.basedir}/templates</directory>
<targetPath>templates</targetPath>
<includes>
<include>**/*.html</include>
</includes>
</resource>
</resources>
<plugins>
<!-- Compiler Plugin using environment-sourced version -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>

<!-- Shade plugin to build fat JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>module-info.class</exclude>
<exclude>META-INF/versions/*/module-info.class</exclude>
<exclude>META-INF/versions/**/module-info.class</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
package function;

import com.github.mustachejava.DefaultMustacheFactory;
import com.github.mustachejava.Mustache;
import com.github.mustachejava.MustacheFactory;

import java.io.*;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;

public class Function {

private static final DateTimeFormatter DATE_FORMATTER =
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

public Map<String, Object> handler(Map<String, Object> event) {
try {
// Get input parameters
String username = (String) event.getOrDefault("username", "Guest");
int randomLen = parseRandomLen(event.get("random_len"));

// Generate random numbers
List<Integer> randomNumbers = generateRandomNumbers(randomLen);

// Get current time
String currentTime = LocalDateTime.now().format(DATE_FORMATTER);

// Prepare template data
Map<String, Object> templateData = new HashMap<>();
templateData.put("username", username);
templateData.put("cur_time", currentTime);
templateData.put("random_numbers", randomNumbers);

// Render HTML
String html = renderTemplate(templateData);

// Return result
Map<String, Object> result = new HashMap<>();
result.put("result", html);
return result;

} catch (Exception e) {
// Return error as result to avoid crashing
Map<String, Object> result = new HashMap<>();
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
result.put("result", "<html><body><h1>Error</h1><pre>" +
sw.toString() + "</pre></body></html>");
return result;
Comment on lines +43 to +51
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Do not return stack traces to clients.

Line 48-Line 50 exposes internal exception details in the HTTP payload. Return a generic error message and log details server-side instead.

Proposed fix
         } catch (Exception e) {
-            // Return error as result to avoid crashing
             Map<String, Object> result = new HashMap<>();
-            StringWriter sw = new StringWriter();
-            PrintWriter pw = new PrintWriter(sw);
-            e.printStackTrace(pw);
-            result.put("result", "<html><body><h1>Error</h1><pre>" + 
-                      sw.toString() + "</pre></body></html>");
+            result.put("result", "<html><body><h1>Error</h1><p>Internal error</p></body></html>");
             return result;
         }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
} catch (Exception e) {
// Return error as result to avoid crashing
Map<String, Object> result = new HashMap<>();
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
result.put("result", "<html><body><h1>Error</h1><pre>" +
sw.toString() + "</pre></body></html>");
return result;
} catch (Exception e) {
Map<String, Object> result = new HashMap<>();
result.put("result", "<html><body><h1>Error</h1><p>Internal error</p></body></html>");
return result;
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@benchmarks/100.webapps/110.dynamic-html/java/src/main/java/function/Function.java`
around lines 43 - 51, The catch block in Function.java currently returns the
exception stack trace to clients via the result map ("result"), which leaks
internals; instead log the exception server-side (e.g., logger.error("Error
processing request", e) or System.err.println with e.printStackTrace()) and
return a generic error HTML payload in the result map (e.g., an "Internal Server
Error" page or message) without any stack or exception details; update the
catch(Exception e) handler to perform the server-side logging and put only the
sanitized message into result.put("result", ...) before returning.

}
}

private int parseRandomLen(Object value) {
if (value instanceof Number) {
return ((Number) value).intValue();
}
if (value instanceof String) {
try {
return Integer.parseInt((String) value);
} catch (NumberFormatException e) {
return 10; // default
}
}
return 10; // default
}

private List<Integer> generateRandomNumbers(int count) {
Random random = new Random();
List<Integer> numbers = new ArrayList<>(count);
for (int i = 0; i < count; i++) {
numbers.add(random.nextInt(1000000));
Comment on lines +55 to +73
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Bound random_len to prevent allocation abuse and runtime failures.

Line 57/Line 61 can return negative or very large values, and Line 71 allocates directly from that count. Add min/max bounds before list allocation.

Proposed fix
+    private static final int DEFAULT_RANDOM_LEN = 10;
+    private static final int MAX_RANDOM_LEN = 10_000;
@@
     private int parseRandomLen(Object value) {
+        int parsed = DEFAULT_RANDOM_LEN;
         if (value instanceof Number) {
-            return ((Number) value).intValue();
+            parsed = ((Number) value).intValue();
+        } else if (value instanceof String) {
+            try {
+                parsed = Integer.parseInt((String) value);
+            } catch (NumberFormatException e) {
+                parsed = DEFAULT_RANDOM_LEN;
+            }
         }
-        if (value instanceof String) {
-            try {
-                return Integer.parseInt((String) value);
-            } catch (NumberFormatException e) {
-                return 10; // default
-            }
-        }
-        return 10; // default
+        if (parsed < 0) return 0;
+        return Math.min(parsed, MAX_RANDOM_LEN);
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@benchmarks/100.webapps/110.dynamic-html/java/src/main/java/function/Function.java`
around lines 55 - 73, The parseRandomLen and generateRandomNumbers methods can
accept negative or unbounded large counts leading to huge allocations; clamp the
parsed/received value to a safe range (e.g., min 0 and a reasonable MAX like
10_000) before using it for allocation or iteration. Update parseRandomLen to
parse then clamp the result to the chosen bounds, and in generateRandomNumbers
clamp the incoming count parameter (or validate and fallback to a safe default)
before creating the ArrayList and iterating; reference parseRandomLen(...) and
generateRandomNumbers(...) when making these changes.

}
return numbers;
}

private String renderTemplate(Map<String, Object> data) throws Exception {
// Try to load template from classpath
InputStream templateStream = getClass().getClassLoader()
.getResourceAsStream("templates/template.html");

if (templateStream == null) {
throw new IOException("Template not found in classpath");
}

// Create Mustache factory and compile template
MustacheFactory mf = new DefaultMustacheFactory();
Mustache mustache;

try (InputStreamReader reader = new InputStreamReader(templateStream)) {
mustache = mf.compile(reader, "template");
}

// Render template
StringWriter writer = new StringWriter();
mustache.execute(writer, data).flush();
return writer.toString();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<title>Randomly generated data.</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" media="screen">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use HTTPS for external CDN resources.

The Bootstrap CSS is loaded over HTTP, which can cause mixed-content warnings and is vulnerable to man-in-the-middle attacks. Use HTTPS instead.

🔒 Suggested fix
-    <link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" media="screen">
+    <link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" media="screen">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" media="screen">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@benchmarks/100.webapps/110.dynamic-html/java/templates/template.html` at line
6, Update the external Bootstrap CDN link in the template's link tag to use
HTTPS instead of HTTP: locate the <link> element that references
"http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" and
change the href to
"https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" so the
stylesheet is loaded over a secure connection.

<style type="text/css">
.container {
max-width: 500px;
padding-top: 100px;
}
</style>
</head>
<body>
<div class="container">
<p>Welcome {{username}}!</p>
<p>Data generated at: {{cur_time}}!</p>
<p>Requested random numbers:</p>
<ul>
{{#random_numbers}}
<li>{{.}}</li>
{{/random_numbers}}
</ul>
</div>
</body>
</html>
Loading