Sad Tux - Windows bias detected
This page contains Windows bias

About This Page

This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.

Bias Analysis

Detected Bias Types
windows_first
windows_tools
missing_linux_example
Summary
The documentation page exhibits Windows bias in several ways: Java examples use Windows-style paths and reference ffmpeg.exe, with no Linux equivalent shown. The Java section does not mention Linux deployment considerations, while the Python section does. PowerShell is mentioned as an upload option before Linux alternatives. There is no parity in showing Linux-specific examples for Java, and Windows tools/patterns (e.g., .exe, Windows paths) are presented first or exclusively.
Recommendations
  • Add Linux-specific examples for Java, including how to reference and execute Linux binaries (e.g., ffmpeg) and handle permissions.
  • In the Java section, clarify cross-platform deployment considerations, such as path formats and executable extensions.
  • When mentioning upload options, list Azure CLI and Linux-native tools before or alongside PowerShell, not after.
  • Avoid using Windows-only file extensions (e.g., .exe) in generic examples; provide both Windows and Linux variants.
  • Explicitly note any platform differences in environment variables, file system paths, and permissions for both Python and Java.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-01-12 00:00 #99 completed Biased Biased
2026-01-11 06:20 #98 completed Biased Biased
2026-01-11 00:00 #95 cancelled Clean Clean
2026-01-10 00:00 #92 completed Clean Clean
2026-01-09 00:00 #87 cancelled Clean Clean
2026-01-06 22:28 #78 completed Clean Clean
2025-12-29 18:00 #48 cancelled Biased Biased
2025-12-15 00:00 #7 completed Clean Clean
2025-12-14 05:05 #6 completed Clean Clean
2025-12-14 04:32 #4 completed Clean Clean
2025-12-14 01:50 #3 completed Clean Clean

Flagged Code Snippets

public class Function {
    final static String BASE_PATH = "BASE_PATH";
    final static String FFMPEG_PATH = "/artifacts/ffmpeg/ffmpeg.exe";
    final static String HELP_FLAG = "-h";
    final static String COMMAND_QUERY = "command";

    @FunctionName("HttpExample")
    public HttpResponseMessage run(
            @HttpTrigger(
                name = "req",
                methods = {HttpMethod.GET, HttpMethod.POST},
                authLevel = AuthorizationLevel.FUNCTION)
                HttpRequestMessage<Optional<String>> request,
            final ExecutionContext context) throws IOException{
        context.getLogger().info("Java HTTP trigger processed a request.");
            
        // Parse query parameter
        String flags = request.getQueryParameters().get(COMMAND_QUERY);
        
        if (flags == null || flags.isBlank()) {
            flags = HELP_FLAG;
        }

        Runtime rt = Runtime.getRuntime();
        String[] commands = { System.getenv(BASE_PATH) + FFMPEG_PATH, flags};
        Process proc = rt.exec(commands);
        
        BufferedReader stdInput = new BufferedReader(new 
        InputStreamReader(proc.getInputStream()));
   
        String out = stdInput.lines().collect(Collectors.joining("\n"));
        if(out.isEmpty()) {
            BufferedReader stdError = new BufferedReader(new 
                InputStreamReader(proc.getErrorStream()));
            out = stdError.lines().collect(Collectors.joining("\n"));
        }
        return request.createResponseBuilder(HttpStatus.OK).body(out).build();

    }