Skip to content

C006 compliance check should recognize probar serve --cross-origin-isolated #17

@noahgift

Description

@noahgift

Problem

The probador comply command fails C006 (COOP/COEP headers) even when using probar serve --cross-origin-isolated:

$ probador comply --detailed .
  [✗] C006: COOP/COEP headers
      └─ No server config found for COOP/COEP headers

However, the project uses:

serve-dev:
    @probar serve www --port 8081 --cross-origin-isolated

Expected Behavior

C006 should recognize:

  1. Makefile targets using probar serve --cross-origin-isolated
  2. probar.toml configuration if present
  3. Other common server configs (nginx.conf, apache.conf, etc.)

Current Behavior

C006 only looks for static config files and doesn't recognize dynamic server commands.

Suggested Fix

Parse Makefile for probar serve.*--cross-origin-isolated pattern:

fn check_coop_coep(path: &Path) -> ComplianceResult {
    // Check Makefile
    if let Ok(makefile) = std::fs::read_to_string(path.join("Makefile")) {
        if makefile.contains("--cross-origin-isolated") {
            return ComplianceResult::pass("COOP/COEP enabled via probar serve");
        }
    }
    // ... existing checks
}

Environment

  • probador 0.4.1
  • Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions