Skip to content

Security: Yuval207/AutoQA

Security

SECURITY.md

AutoQA Security Model & Guidelines

AutoQA runs arbitrary user repositories and tests web applications. Security is enforced at every layer of the architecture:


1. Zip Slip & Path Traversal Mitigation

When uncompressing user-uploaded .zip repositories, every entry is sanitized:

Path destination = targetDirectory.resolve(entry.getName()).normalize();
if (!destination.startsWith(targetDirectory)) {
    throw new SecurityException("Zip Slip entry attempted traversal: " + entry.getName());
}

Similarly, the artifact storage controller strictly validates requested filenames to prevent directory traversal (.. or absolute paths).


2. GitHub Repository Import

  • Only github.com repository links are accepted. Owner, repository, and branch names are checked against strict character sets before any request is made.
  • Requests go only to codeload.github.com and api.github.com. The API's redirect is followed only when it points to https://codeload.github.com, so the import cannot be used to reach other hosts (SSRF).
  • Downloads are capped at MAX_UPLOAD_SIZE_MB and then pass through the same Zip Slip and size checks as uploaded archives.
  • Access tokens for private repositories are sent only to api.github.com for that single download. They are never persisted, logged, or returned in API responses.

3. Process Sandbox & Resource Isolation

  • Application under test is spawned in a separate child process.
  • Execution timeouts prevent infinite loops and runaway test runs.
  • Process tree cleanup handles graceful termination (SIGTERM) followed by forced shutdown (SIGKILL) if processes do not exit within 2 seconds.

4. Authentication & API Protection

  • All public endpoints require JWT bearer tokens signed with HMAC-SHA256 (HS256 or HS512).
  • Passwords are encrypted using Spring Security's BCryptPasswordEncoder with a secure work factor.
  • Worker endpoints (/api/worker/**) are isolated and bound to internal application networking.
  • Cross-Origin Resource Sharing (CORS) is restricted to configured frontend origins.

5. Playwright Browser Isolation

  • Each test scenario runs in a newly created, isolated browser context.
  • Cookies, cache, and local storage do not leak between scenarios.
  • Sandboxing arguments (--no-sandbox, --disable-setuid-sandbox) are constrained to headless container runners.

6. Vulnerability Reporting

If you identify a security defect, please report it privately to security@autoqa.local.

There aren't any published security advisories