Skip to content

Add Yesod detection and route analysis for Haskell projects#1343

Merged
hahwul merged 5 commits intomainfrom
copilot/add-yesod-detector-analyzer
May 7, 2026
Merged

Add Yesod detection and route analysis for Haskell projects#1343
hahwul merged 5 commits intomainfrom
copilot/add-yesod-detector-analyzer

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

Yesod projects were not recognized or analyzed, so Noir missed endpoints declared through Yesod’s routing DSL. This adds first-class support for detecting Yesod apps and extracting routes from both inline and file-based route definitions.

  • Framework support

    • adds haskell_yesod tech metadata and wires Yesod into detector/analyzer registration
    • recognizes Yesod projects from Haskell source usage (mkYesod, parseRoutes, parseRoutesFile, import Yesod) and package metadata (package.yaml, .cabal)
  • Route extraction

    • parses inline Yesod route blocks:
      • mkYesod ... [parseRoutes| ... |]
      • mkYesodData ... [parseRoutes| ... |]
    • parses external route files referenced via parseRoutesFile
    • supports nested route trees, multiple HTTP methods per route, and comment/line-continuation handling
  • Path parameter handling

    • converts Yesod dynamic segments into Noir path params:
      • #Type:type
      • *Type / +Type → wildcard path params
    • preserves parameter type information in extracted params for dynamic and multipiece segments
  • Coverage

    • adds unit coverage for Yesod detection
    • adds functional fixtures/specs covering:
      • inline routes
      • external .yesodroutes files
      • nested route groups
      • single and multi-piece dynamic segments

Example of routes now recognized:

mkYesodData "App" [parseRoutes|
/ HomeR GET
/blog/#Text BlogPostR GET POST
/api ApiR:
    /health HealthR GET
    /users/#UserId UserR PUT DELETE
|]

This produces endpoints such as:

  • GET /
  • GET /blog/:text
  • POST /blog/:text
  • GET /api/health
  • PUT /api/users/:user_id
  • DELETE /api/users/:user_id

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.yesodweb.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue May 6, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add Yesod detector and analyzer for Haskell framework Add Yesod detection and route analysis for Haskell projects May 6, 2026
Copilot AI requested a review from hahwul May 6, 2026 14:55
Copilot finished work on behalf of hahwul May 6, 2026 14:55
Copilot AI and others added 5 commits May 7, 2026 16:16
Agent-Logs-Url: https://github.com/owasp-noir/noir/sessions/9fd8b4a3-f603-444b-bed9-1cd440060a77

Co-authored-by: hahwul <13212227+hahwul@users.noreply.github.com>
Agent-Logs-Url: https://github.com/owasp-noir/noir/sessions/9fd8b4a3-f603-444b-bed9-1cd440060a77

Co-authored-by: hahwul <13212227+hahwul@users.noreply.github.com>
Agent-Logs-Url: https://github.com/owasp-noir/noir/sessions/9fd8b4a3-f603-444b-bed9-1cd440060a77

Co-authored-by: hahwul <13212227+hahwul@users.noreply.github.com>
Agent-Logs-Url: https://github.com/owasp-noir/noir/sessions/9fd8b4a3-f603-444b-bed9-1cd440060a77

Co-authored-by: hahwul <13212227+hahwul@users.noreply.github.com>
@hahwul hahwul force-pushed the copilot/add-yesod-detector-analyzer branch from c046f5d to 24d48f3 Compare May 7, 2026 07:17
@hahwul hahwul marked this pull request as ready for review May 7, 2026 07:17
@github-actions github-actions Bot added 🔎 detector Issue for Detector 🔬 analyzer Issue for Analyzer 💊 spec Issue for test codes labels May 7, 2026
@hahwul hahwul merged commit 692ce0b into main May 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔬 analyzer Issue for Analyzer 🔎 detector Issue for Detector 💊 spec Issue for test codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Yesod detector & analyzer (haskell web framework)

2 participants