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_tools
windows_first
missing_linux_example
Summary
The documentation demonstrates a Windows bias primarily in the Java example, where the ffmpeg path uses a Windows-style executable (ffmpeg.exe) and the instructions reference a Windows directory structure. There is no explicit Linux/Unix example for Java, and the use of .exe implies Windows as the default. In contrast, the Python examples and the file share mounting section are Linux-focused, but there is no parity in providing both Windows and Linux examples for all languages. Additionally, PowerShell is mentioned as an upload option, but not demonstrated, and Windows tools are referenced before Linux equivalents in some places.
Recommendations
  • For Java, provide both Windows and Linux examples for accessing and executing dependencies, including paths and executable formats (e.g., ffmpeg.exe vs. ffmpeg).
  • Avoid using Windows-specific file extensions (like .exe) in cross-platform documentation unless both alternatives are shown.
  • Explicitly mention and demonstrate how to set up and use dependencies on both Windows and Linux environments for all supported languages.
  • When referencing upload tools (Azure CLI, PowerShell, Portal), provide example commands for both Windows (PowerShell/CMD) and Linux (Bash) environments.
  • Ensure that instructions and code snippets do not assume a default platform; clarify when steps or paths differ between Windows and Linux.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-01-14 00:00 #250 in_progress Biased Biased
2026-01-13 00:00 #246 completed Biased Biased
2026-01-12 00:00 #243 cancelled Biased Biased
2026-01-11 00:00 #240 completed Biased Biased
2026-01-10 00:00 #237 completed Biased Biased
2026-01-09 00:34 #234 completed Biased Biased
2026-01-08 00:53 #231 completed Biased Biased
2026-01-06 18:15 #225 cancelled Clean Clean
2025-08-17 00:01 #83 cancelled Clean Clean
2025-07-13 21:37 #48 completed Biased Biased
2025-07-09 13:09 #3 cancelled Clean Clean
2025-07-08 04:23 #2 cancelled Biased Biased

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.ANONYMOUS)
                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();

    }