Skip to content

Add WebApp.API ruleset for detecting exposed HTTP/REST APIs#646

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/enhanced-api-detection-engine
Draft

Add WebApp.API ruleset for detecting exposed HTTP/REST APIs#646
Copilot wants to merge 2 commits into
mainfrom
copilot/enhanced-api-detection-engine

Conversation

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Adds a default ruleset that flags when scanned software exposes an HTTP/REST API, so consumers can reliably answer "does this repo serve an API?" The detection goes beyond the literal patterns suggested in the issue to cover conceptually equivalent indicators across major server-side ecosystems.

Changes

  • New rule file AppInspector/rules/default/webapp/api.json — 12 rules (AI090000AI090700, previously-unused ID range), auto-embedded via the existing rules/default/**/*.json glob.
  • Framework coverage:
    • Python — FastAPI, Flask, Django REST Framework
    • JavaScript/TypeScript — Express/Koa/Hapi/Fastify/Restify, NestJS
    • C# — ASP.NET MVC / Web API / Minimal APIs
    • Java/Kotlin — Spring, JAX-RS
    • Go — net/http, Gin, Echo, gorilla/mux, chi
    • Ruby — Sinatra/Rails; PHP — Laravel/Slim/Symfony
    • OpenAPI/Swagger JSON & YAML specification documents
  • Two-level tagging for classification in reports:
    • WebApp.API — umbrella tag; match this alone to detect API exposure regardless of stack
    • WebApp.API.<Stack>.<Framework> — e.g. WebApp.API.Python.FastAPI, WebApp.API.DotNet.AspNet — for drill-down
  • Each rule carries must-match/must-not-match self-tests; patterns are scoped/anchored (word boundaries, app|router prefixes, verb-suffixed .Map*() to limit false positives like store.getItem( or dictionary.MapValues().

WebApp is an existing top-level tag prefix and the file sits in the existing webapp/ directory, keeping naming consistent.

Example output

Analyzing a FastAPI app surfaces both tags in metaData.uniqueTags:

app = FastAPI()

@app.get("/items/{item_id}")
def read_item(item_id: int): ...
WebApp.API
WebApp.API.Python.FastAPI

Copilot AI changed the title [WIP] Add ruleset for enhanced API detection Add WebApp.API ruleset for detecting exposed HTTP/REST APIs Jun 24, 2026
Copilot finished work on behalf of gfs June 24, 2026 23:19
Copilot AI requested a review from gfs June 24, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants