quin-scanner 0.1.0b1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. quin_scanner-0.1.0b1/.env.example +29 -0
  2. quin_scanner-0.1.0b1/.gitattributes +24 -0
  3. quin_scanner-0.1.0b1/.github/workflows/ci.yml +38 -0
  4. quin_scanner-0.1.0b1/.github/workflows/publish.yml +33 -0
  5. quin_scanner-0.1.0b1/.gitignore +51 -0
  6. quin_scanner-0.1.0b1/.python-version +1 -0
  7. quin_scanner-0.1.0b1/CHANGELOG.md +146 -0
  8. quin_scanner-0.1.0b1/CODE_OF_CONDUCT.md +29 -0
  9. quin_scanner-0.1.0b1/CONTRIBUTING.md +136 -0
  10. quin_scanner-0.1.0b1/LICENSE +183 -0
  11. quin_scanner-0.1.0b1/PKG-INFO +328 -0
  12. quin_scanner-0.1.0b1/README.md +286 -0
  13. quin_scanner-0.1.0b1/SECURITY.md +29 -0
  14. quin_scanner-0.1.0b1/docs/Databricks-DASF-Reference.md +105 -0
  15. quin_scanner-0.1.0b1/docs/OWASP-Agentic-Top10-Reference.md +65 -0
  16. quin_scanner-0.1.0b1/docs/OWASP-LLM-Top10.md +292 -0
  17. quin_scanner-0.1.0b1/docs/OWASP-MAESTRO-Reference.md +186 -0
  18. quin_scanner-0.1.0b1/docs/OWASP-MCP-Top10-Reference.md +353 -0
  19. quin_scanner-0.1.0b1/docs/quin-demo.gif +0 -0
  20. quin_scanner-0.1.0b1/docs/report-walkthrough.gif +0 -0
  21. quin_scanner-0.1.0b1/docs/rfcs/0001-risk-framework-linking.md +289 -0
  22. quin_scanner-0.1.0b1/docs/risk-framework.md +960 -0
  23. quin_scanner-0.1.0b1/pyproject.toml +73 -0
  24. quin_scanner-0.1.0b1/scanner-config.yaml +79 -0
  25. quin_scanner-0.1.0b1/scripts/generate_risk_framework_docs.py +108 -0
  26. quin_scanner-0.1.0b1/scripts/templates/risk-framework.md.j2 +113 -0
  27. quin_scanner-0.1.0b1/src/quin_scanner/__init__.py +1 -0
  28. quin_scanner-0.1.0b1/src/quin_scanner/cli.py +388 -0
  29. quin_scanner-0.1.0b1/src/quin_scanner/config.py +164 -0
  30. quin_scanner-0.1.0b1/src/quin_scanner/file_index.py +84 -0
  31. quin_scanner-0.1.0b1/src/quin_scanner/github_client.py +152 -0
  32. quin_scanner-0.1.0b1/src/quin_scanner/html_template.py +952 -0
  33. quin_scanner-0.1.0b1/src/quin_scanner/llm/__init__.py +0 -0
  34. quin_scanner-0.1.0b1/src/quin_scanner/llm/analyzer.py +108 -0
  35. quin_scanner-0.1.0b1/src/quin_scanner/llm/anthropic_provider.py +30 -0
  36. quin_scanner-0.1.0b1/src/quin_scanner/llm/base.py +64 -0
  37. quin_scanner-0.1.0b1/src/quin_scanner/llm/classification_agent.py +148 -0
  38. quin_scanner-0.1.0b1/src/quin_scanner/llm/google_provider.py +30 -0
  39. quin_scanner-0.1.0b1/src/quin_scanner/llm/ollama_provider.py +40 -0
  40. quin_scanner-0.1.0b1/src/quin_scanner/llm/openai_compatible.py +29 -0
  41. quin_scanner-0.1.0b1/src/quin_scanner/llm/openai_provider.py +31 -0
  42. quin_scanner-0.1.0b1/src/quin_scanner/llm/synthesis_agent.py +450 -0
  43. quin_scanner-0.1.0b1/src/quin_scanner/logo.png +0 -0
  44. quin_scanner-0.1.0b1/src/quin_scanner/model_identifier.py +394 -0
  45. quin_scanner-0.1.0b1/src/quin_scanner/models.py +266 -0
  46. quin_scanner-0.1.0b1/src/quin_scanner/orchestrator.py +1265 -0
  47. quin_scanner-0.1.0b1/src/quin_scanner/repo_accessor.py +424 -0
  48. quin_scanner-0.1.0b1/src/quin_scanner/report.py +57 -0
  49. quin_scanner-0.1.0b1/src/quin_scanner/risk_taxonomy.py +197 -0
  50. quin_scanner-0.1.0b1/src/quin_scanner/rules/__init__.py +18 -0
  51. quin_scanner-0.1.0b1/src/quin_scanner/rules/code_patterns.yaml +289 -0
  52. quin_scanner-0.1.0b1/src/quin_scanner/rules/dependencies.yaml +164 -0
  53. quin_scanner-0.1.0b1/src/quin_scanner/rules/exclusions.yaml +16 -0
  54. quin_scanner-0.1.0b1/src/quin_scanner/rules/file_markers.yaml +50 -0
  55. quin_scanner-0.1.0b1/src/quin_scanner/rules/frameworks.yaml +69 -0
  56. quin_scanner-0.1.0b1/src/quin_scanner/rules/frameworks_lookup.yaml +108 -0
  57. quin_scanner-0.1.0b1/src/quin_scanner/rules/kri_predicates.py +76 -0
  58. quin_scanner-0.1.0b1/src/quin_scanner/rules/models.yaml +112 -0
  59. quin_scanner-0.1.0b1/src/quin_scanner/rules/prompt_signals.yaml +16 -0
  60. quin_scanner-0.1.0b1/src/quin_scanner/rules/risk_taxonomy.yaml +930 -0
  61. quin_scanner-0.1.0b1/src/quin_scanner/rules/signal_groups.yaml +37 -0
  62. quin_scanner-0.1.0b1/src/quin_scanner/rules/tool_services.yaml +95 -0
  63. quin_scanner-0.1.0b1/src/quin_scanner/scanners/__init__.py +0 -0
  64. quin_scanner-0.1.0b1/src/quin_scanner/scanners/agent_instance_scanner.py +291 -0
  65. quin_scanner-0.1.0b1/src/quin_scanner/scanners/base.py +21 -0
  66. quin_scanner-0.1.0b1/src/quin_scanner/scanners/ci_scanner.py +84 -0
  67. quin_scanner-0.1.0b1/src/quin_scanner/scanners/code_pattern.py +74 -0
  68. quin_scanner-0.1.0b1/src/quin_scanner/scanners/config_scanner.py +128 -0
  69. quin_scanner-0.1.0b1/src/quin_scanner/scanners/dependency.py +256 -0
  70. quin_scanner-0.1.0b1/src/quin_scanner/scanners/dockerfile.py +126 -0
  71. quin_scanner-0.1.0b1/src/quin_scanner/scanners/file_structure.py +97 -0
  72. quin_scanner-0.1.0b1/src/quin_scanner/scanners/framework.py +52 -0
  73. quin_scanner-0.1.0b1/src/quin_scanner/scanners/iac.py +108 -0
  74. quin_scanner-0.1.0b1/src/quin_scanner/scanners/jupyter.py +102 -0
  75. quin_scanner-0.1.0b1/src/quin_scanner/scanners/mcp_scanner.py +115 -0
  76. quin_scanner-0.1.0b1/src/quin_scanner/scanners/prompt_discovery.py +224 -0
  77. quin_scanner-0.1.0b1/src/quin_scanner/scanners/tool_definition_scanner.py +347 -0
  78. quin_scanner-0.1.0b1/src/quin_scanner/vuln_checker.py +515 -0
  79. quin_scanner-0.1.0b1/tests/__init__.py +0 -0
  80. quin_scanner-0.1.0b1/tests/test_config.py +176 -0
  81. quin_scanner-0.1.0b1/tests/test_framework_detection.py +116 -0
  82. quin_scanner-0.1.0b1/tests/test_llm_parsing.py +320 -0
  83. quin_scanner-0.1.0b1/tests/test_model_identifier.py +207 -0
  84. quin_scanner-0.1.0b1/tests/test_orchestrator_helpers.py +420 -0
  85. quin_scanner-0.1.0b1/tests/test_repo_accessor.py +113 -0
  86. quin_scanner-0.1.0b1/tests/test_report.py +121 -0
  87. quin_scanner-0.1.0b1/tests/test_risk_framework_docs.py +129 -0
  88. quin_scanner-0.1.0b1/tests/test_vuln_checker.py +371 -0
  89. quin_scanner-0.1.0b1/uv.lock +1266 -0
@@ -0,0 +1,29 @@
1
+ # ── LLM Provider API Keys ───────────────────────────────────────────────────
2
+ # Uncomment and set the key for whichever provider you use.
3
+
4
+ # OPENAI_API_KEY=sk-...
5
+ # ANTHROPIC_API_KEY=sk-ant-...
6
+ # GOOGLE_API_KEY=...
7
+
8
+ # ── GitHub ───────────────────────────────────────────────────────────────────
9
+ # Personal access token — required for scanning GitHub repos or orgs.
10
+ # Needs at least read:org and repo (public_repo for public-only) scopes.
11
+ # GITHUB_TOKEN=ghp_...
12
+
13
+ # ── OpenAI-compatible endpoint (vLLM, LiteLLM, Azure, Ollama, etc.) ─────────
14
+ # Set this to use a custom base URL instead of api.openai.com.
15
+ # OPENAI_COMPATIBLE_URL=http://localhost:11434/v1
16
+
17
+ # ── Vulnerability lookup ────────────────────────────────────────────────────
18
+ # The scanner always queries OSV.dev (free, no auth) for the detected
19
+ # framework+version. Optionally it can also ask an LLM with web-search
20
+ # enabled for very recent advisories that may not be in OSV yet.
21
+ #
22
+ # Supported providers (each reuses that provider's existing API key env var):
23
+ # perplexity → requires PERPLEXITY_API_KEY
24
+ # gemini → requires GOOGLE_API_KEY
25
+ # openai → requires OPENAI_API_KEY
26
+ # anthropic → requires ANTHROPIC_API_KEY
27
+ # none → disable web search (OSV still runs)
28
+ # VULN_SEARCH_PROVIDER=anthropic
29
+ # PERPLEXITY_API_KEY=pplx-...
@@ -0,0 +1,24 @@
1
+ # Normalize line endings
2
+ * text=auto
3
+
4
+ # Python
5
+ *.py text diff=python
6
+ *.pyx text diff=python
7
+
8
+ # YAML
9
+ *.yaml text
10
+ *.yml text
11
+
12
+ # JSON
13
+ *.json text
14
+
15
+ # Markdown
16
+ *.md text diff=markdown
17
+
18
+ # Shell
19
+ *.sh text eol=lf
20
+
21
+ # Templates
22
+ *.jinja2 text
23
+ *.j2 text
24
+ *.mustache text
@@ -0,0 +1,38 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ check:
11
+ name: Lint, build, and smoke test
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v4
19
+ with:
20
+ version: "latest"
21
+
22
+ - name: Set up Python
23
+ run: uv python install 3.11
24
+
25
+ - name: Install dependencies
26
+ run: uv sync --all-extras
27
+
28
+ - name: Lint
29
+ run: uv run ruff check src/
30
+
31
+ - name: Test
32
+ run: uv run pytest tests/ -v
33
+
34
+ - name: Build package
35
+ run: uv run python -m build
36
+
37
+ - name: Smoke test
38
+ run: uv run quin-scanner --help
@@ -0,0 +1,33 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*.*.*"
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ publish:
11
+ name: Build and publish
12
+ runs-on: ubuntu-latest
13
+ environment: pypi
14
+ permissions:
15
+ id-token: write
16
+ contents: read
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@v4
23
+ with:
24
+ version: "latest"
25
+
26
+ - name: Set up Python
27
+ run: uv python install 3.11
28
+
29
+ - name: Build package
30
+ run: uv build
31
+
32
+ - name: Publish to PyPI
33
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,51 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ *.egg-info/
7
+ *.egg
8
+ dist/
9
+ build/
10
+ *.whl
11
+
12
+ # Virtual environments
13
+ .venv/
14
+ venv/
15
+ ENV/
16
+
17
+ # IDE
18
+ .idea/
19
+ .vscode/
20
+ *.swp
21
+ *.swo
22
+ *~
23
+
24
+ # Testing
25
+ .pytest_cache/
26
+ htmlcov/
27
+ .coverage
28
+ .coverage.*
29
+ coverage.xml
30
+ reports/
31
+
32
+ # OS
33
+ .DS_Store
34
+ Thumbs.db
35
+
36
+ # Environment
37
+ .env
38
+ .env.*
39
+ !.env.example
40
+
41
+ # Build (keep uv.lock for reproducible builds)
42
+ !uv.lock
43
+
44
+ # Agent
45
+ .agent/skills
46
+
47
+ # Scan output (generated by quin-scanner; not source-controlled)
48
+ report/*.html
49
+ report/*.json
50
+ report/*.yaml
51
+ report/*.yml
@@ -0,0 +1 @@
1
+ 3.11
@@ -0,0 +1,146 @@
1
+ # Changelog
2
+
3
+ All notable changes to Quin Agent Scanner are documented here.
4
+
5
+ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
+ Versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ---
9
+
10
+ ## [Unreleased]
11
+
12
+ ### Added
13
+
14
+ #### Risk Signal Data Model
15
+ - `RiskIndicator.threat_id` — new optional field (`str | None`) identifying the originating threat (e.g. `"T001"`) per risk signal. Additive / backward-compatible: `to_dict()` includes the field, consumers that don't read it are unaffected. Enables downstream reports and UIs to link each signal to its threat in the taxonomy.
16
+ - LLM synthesis prompt updated to emit `threat_id` alongside each KRI in `risk_signals` (both repo-level and per-agent). Parser in `_parse_risk_signals` extracts the field; legacy string-format signals yield `threat_id=None`.
17
+ - Hardcoded CVE/vulnerability risk signal in the orchestrator now carries `threat_id="T003"` (AI Supply Chain Compromise).
18
+
19
+ #### Risk Framework Documentation
20
+ - `docs/risk-framework.md` — generated reference documenting all 14 threats (T001–T014) and 14 controls (C001–C014) with description, rationale, key risk indicators, attack patterns, implementation guidance, common pitfalls, and sourced external references. Grounded in OWASP LLM Top 10, OWASP Agentic AI Top 10, OWASP MCP Top 10, OWASP MAESTRO, and Databricks DASF.
21
+ - `src/quin_scanner/rules/risk_taxonomy.yaml` — extended with prose fields (`description`, `why_it_matters`, `attack_patterns`, `external_refs` on threats; `description`, `why_it_matters`, `how_to_implement`, `common_pitfalls`, `external_refs` on controls). YAML is the single source of truth — the MD is generated.
22
+ - `scripts/generate_risk_framework_docs.py` — Jinja2-based generator with `--check` drift-gate flag suitable for CI. Template at `scripts/templates/risk-framework.md.j2`.
23
+ - `src/quin_scanner/risk_taxonomy.py` — loader extended to surface the new prose fields via `ExternalRef`, `Threat`, and `Control` dataclasses (all new fields default-populated so existing consumers are unaffected).
24
+ - `tests/test_risk_framework_docs.py` — drift, completeness, and referential-integrity tests: the on-disk MD must match what the generator produces, every T0NN/C0NN must have stable `t0NN`/`c0NN` anchors, every threat's `recommended_controls` must resolve to a real control, and every external ref must have a title and an http(s) URL.
25
+
26
+ #### HTML Report Deep-Links to Risk Framework
27
+ - `html_template.py` — control labels rendered inside risk signals (e.g. `C003: Access Control & Least Privilege`) are now clickable links that open `docs/risk-framework.md#c003` on GitHub. Each risk signal with a known `threat_id` renders a small `↗` icon linking to the matching `#t0NN` anchor. All external links use `target="_blank" rel="noopener"` to avoid reverse-tabnabbing. The click handler was refactored to ignore clicks on deep-link anchors so the row-toggle behavior still works for the rest of the signal.
28
+
29
+ #### Scanner Plugins (+2, now 13 total)
30
+ - `tool_definition` — extracts named tool definitions from code via `@tool`, `@function_tool`, `@register_tool`, `@kernel_function`, `@register_function` decorators, `BaseTool` / `StructuredTool` class inheritance, tool registration calls (`register_tool()`, `server.tool()`), and Markdown tool-definition tables
31
+ - `agent_instance` — extracts named agent instantiations from code (`Agent(name=...)`, `AssistantAgent`, `UserProxyAgent`, `ConversableAgent`, etc.) and YAML/JSON agent config files
32
+
33
+ #### Risk Taxonomy & Classification
34
+ - `risk_taxonomy.yaml` — structured threat catalog sourced from OWASP LLM Top 10, OWASP Agentic Top 10, OWASP MCP Top 10, MAESTRO, and Databricks DASF
35
+ - `risk_taxonomy.py` — loader and query interface for the threat taxonomy
36
+ - `classification_agent.py` — LLM Pass 1 that classifies system type (`standard_ai`, `agentic_ai`, `mcp_enabled`, `multi_agent`) and identifies relevant threats from the taxonomy
37
+ - `RiskIndicator` dataclass — pairs a key risk indicator signal with its recommended controls
38
+ - `ClassificationResult` dataclass — captures system types and relevant threat IDs
39
+ - Repo-level `risk_signals` field on `SynthesisResult` and `ScanReport`
40
+
41
+ #### External Service Detection
42
+ - `tool_services.yaml` — maps high-signal packages to service categories: web search, web browsing, code execution, database access, file system, email, and more
43
+ - `ToolUsage` now includes `tool_type` (tool_definition / external_service / skill / mcp_tool) and `service_category`
44
+
45
+ #### Signal Groups
46
+ - `signal_groups.yaml` — cross-scanner framework corroboration rules that boost confidence when multiple co-occurring signals appear (e.g. OpenClaw: `SOUL.md` + `AGENTS.md` + `openclaw.json`)
47
+
48
+ #### HTML Report Output
49
+ - `html_template.py` — self-contained HTML report template with embedded JS dashboard
50
+ - `--format html` output option via `ReportGenerator.to_html()`
51
+
52
+ #### Detection Rules (expanded)
53
+ - New entries in `code_patterns.yaml`, `dependencies.yaml`, `file_markers.yaml`, `frameworks.yaml`, and `frameworks_lookup.yaml`
54
+
55
+ ### Changed
56
+ - `findings` field renamed to `artifacts` in `ScanReport` output
57
+ - `risk_signals` on `AgentProfile` changed from `list[str]` to `list[RiskIndicator]` (now includes recommended controls)
58
+ - CLI help text and option descriptions overhauled for all scan commands
59
+ - Orchestrator expanded with two-pass LLM pipeline (classification → synthesis)
60
+
61
+ ### Fixed
62
+ - Removed compiled Python bytecache files (`.pyc`) from repository
63
+
64
+ ### Maintenance
65
+ - `pyproject.toml` — added `jinja2>=3.1` to the `dev` extra (used only by the risk-framework doc generator; not a runtime dependency).
66
+ - Updated dependency versions in `pyproject.toml`
67
+ - Updated scanner configuration defaults in `scanner-config.yaml`
68
+ - PyPI publish workflow switched to OIDC authentication with `contents: read` permission
69
+ - Updated project branding, repository URL, and company information in README
70
+ - Removed testing documentation and references from project files
71
+
72
+ ---
73
+
74
+ ## [0.1.0] — 2026-03-31
75
+
76
+ **Drop 1 — Scan Any Repo for AI**
77
+
78
+ ### Added
79
+
80
+ #### Scan Modes
81
+ - `scan` command — scan a local folder or GitHub repo URL
82
+ - `scan-org` command — scan all repos in a GitHub org sequentially
83
+ - `scan-batch` command — scan multiple targets from a file
84
+ - `GitHubAPIAccessor` — shallow-clone any GitHub repo URL via REST API
85
+ - `GitHubMCPAccessor` — MCP-based accessor for interactive use
86
+ - `RepoAccessorFactory` — auto-selects accessor from target string (local path vs GitHub URL)
87
+ - `--github-token` flag and `GITHUB_TOKEN` env var for GitHub PAT authentication
88
+ - `--skip-archived` and `--skip-forks` flags on `scan-org`
89
+
90
+ #### Scanner Plugins (11 total)
91
+ - `dependency` — AI packages in requirements.txt, pyproject.toml, package.json, go.mod, Cargo.toml, pom.xml, build.gradle
92
+ - `code_pattern` — AI imports and API calls in .py, .js, .ts, .go, .rs, .java
93
+ - `config` — AI API keys in .env and config files
94
+ - `file_structure` — AI-related directories (prompts/, agents/, chains/, vector_store/)
95
+ - `framework` — framework config files (langgraph.json, crew.yaml, .mcp.json, dify.yaml, and 10+ more)
96
+ - `prompt_discovery` — system prompts from Python strings, YAML, .prompt, .jinja2, .mustache
97
+ - `dockerfile` — AI base images and pip installs in Dockerfile and docker-compose
98
+ - `jupyter` — AI imports and prompts in Jupyter notebooks (.ipynb)
99
+ - `ci` — AI API keys and installs in GitHub Actions, GitLab CI, Azure Pipelines, CircleCI, Jenkins
100
+ - `iac` — AI services in Terraform (.tf) and Kubernetes/Helm YAML
101
+ - `mcp` — MCP server configs (.mcp.json, claude_desktop_config.json, cline settings, etc.)
102
+
103
+ #### Framework Detection (23+ frameworks)
104
+ - LangChain, LangGraph, CrewAI, AutoGen, OpenAI Agents SDK
105
+ - **New**: Anthropic Agent SDK (`claude-agent-sdk`)
106
+ - **New**: Google ADK (`google-adk`)
107
+ - **New**: Databricks Agent Framework (`databricks-agents`)
108
+ - LlamaIndex, Haystack, Semantic Kernel, Dify, Flowise, PromptFlow, Vercel AI SDK, MCP
109
+
110
+ #### LLM Model Identification
111
+ - `model_identifier.py` — detects LLM model names from code, config files, and env vars
112
+ - Identifies provider (openai, anthropic, google, meta, mistral, cohere, aws, databricks)
113
+ - Detects primary/fallback routing patterns from YAML config and code structures
114
+ - `rules/models.yaml` — known model name registry across all major providers
115
+ - `ModelUsage` dataclass with provider, model_name, source, file_path, line_number, role
116
+ - `model_usages` section added to `ScanReport` output
117
+
118
+ #### LLM Providers (5 total)
119
+ - OpenAI (`openai`) — default model: `gpt-4o-mini`
120
+ - Anthropic (`anthropic`) — default model: `claude-haiku-4-5-20251001`
121
+ - Google (`google`) — default model: `gemini-2.0-flash`
122
+ - Ollama (`ollama`) — default model: `llama3.2`
123
+ - **New**: OpenAI-compatible (`openai-compatible`) — any endpoint implementing the OpenAI chat API (vLLM, LiteLLM, Azure OpenAI, AWS Bedrock via gateway, LocalAI)
124
+ - `--openai-compatible-url` flag for base URL configuration
125
+
126
+ #### Output & Configuration
127
+ - JSON and YAML output formats
128
+ - `--no-llm` flag — run all 11 scanners without LLM calls
129
+ - `--output-file` flag — write report to file instead of stdout
130
+ - `--config` flag — load settings from `scanner-config.yaml`
131
+ - `--branch` flag — specify git branch for GitHub URL scans
132
+
133
+ #### Detection Rules
134
+ - `dependencies.yaml` — 100+ AI packages across PyPI, npm, Go, crates.io, Maven
135
+ - `code_patterns.yaml` — 60+ regex patterns across Python, JS, TS, Go, Rust, Java
136
+ - `file_markers.yaml` — AI-related directory and file extension markers
137
+ - `frameworks.yaml` — 23+ framework config file signatures
138
+ - `models.yaml` — known LLM model names by provider
139
+
140
+ #### 12 Capability Tags
141
+ `llm-api` · `embeddings` · `rag` · `tool-use` · `multi-agent` · `memory` · `prompt-templates` · `fine-tuning` · `image-gen` · `voice-ai` · `code-gen` · `orchestration`
142
+
143
+ ---
144
+
145
+ [Unreleased]: https://github.com/quin-scanner/quin-agent-scanner/compare/v0.1.0...HEAD
146
+ [0.1.0]: https://github.com/quin-scanner/quin-agent-scanner/releases/tag/v0.1.0
@@ -0,0 +1,29 @@
1
+ # Code of Conduct
2
+
3
+ ## Our Standards
4
+
5
+ Quin Agent Scanner is an open-source project. We expect all participants — contributors, maintainers, and users — to interact with professionalism and respect.
6
+
7
+ **Expected behavior:**
8
+ - Be respectful and constructive in discussions, code reviews, and issue comments
9
+ - Welcome contributors of all experience levels
10
+ - Focus feedback on ideas and code, not people
11
+ - Accept differing viewpoints and technical opinions gracefully
12
+
13
+ **Unacceptable behavior:**
14
+ - Disrespectful, insulting, or dismissive language
15
+ - Personal attacks or harassment of any kind
16
+ - Sharing others' private information without consent
17
+ - Sustained disruption of discussions or reviews
18
+
19
+ ## Scope
20
+
21
+ This Code of Conduct applies in all project spaces: GitHub Issues, Pull Requests, Discussions, and any other official communication channels.
22
+
23
+ ## Enforcement
24
+
25
+ Instances of unacceptable behavior may be reported by opening a GitHub Issue or contacting the maintainers directly via the repository. Maintainers will review and respond to reports, and may remove comments, close issues, or restrict access as appropriate.
26
+
27
+ ## Attribution
28
+
29
+ This Code of Conduct is adapted from community standards common to open-source projects. It applies to all contributors and participants in the Quin Agent Scanner project.
@@ -0,0 +1,136 @@
1
+ # Contributing to Quin Agent Scanner
2
+
3
+ Thank you for your interest in contributing. This document covers how to get started, the development workflow, and what we look for in contributions.
4
+
5
+ ---
6
+
7
+ ## Getting Started
8
+
9
+ ### Prerequisites
10
+
11
+ - Python 3.11+
12
+ - [uv](https://docs.astral.sh/uv/) package manager
13
+
14
+ ### Set Up the Dev Environment
15
+
16
+ ```bash
17
+ git clone https://github.com/quin-scanner/quin-agent-scanner
18
+ cd quin-agent-scanner
19
+ uv sync --all-extras
20
+ ```
21
+
22
+ This installs all dependencies into a local `.venv`.
23
+
24
+ ---
25
+
26
+ ## Ways to Contribute
27
+
28
+ ### Bug Reports
29
+
30
+ Open an issue with:
31
+ - Quin Scanner version (`quin-scanner --version`)
32
+ - OS and Python version
33
+ - Command you ran
34
+ - Expected vs actual output
35
+ - Minimal reproducer (a small repo or fixture that triggers the bug)
36
+
37
+ ### Feature Requests
38
+
39
+ Open an issue describing:
40
+ - What you want to do that you can't do today
41
+ - Why it matters (use case)
42
+ - Any ideas on how it could work
43
+
44
+ Check the [drop plan](docs/plans/2026-03-31-quin-agent-scanner-drop-plan.md) first — features may already be scheduled.
45
+
46
+ ### Pull Requests
47
+
48
+ 1. **Fork** the repo and create a branch from `main`
49
+ 2. **Keep scope tight** — one feature or fix per PR
50
+ 3. **Update CHANGELOG.md** under `[Unreleased]`
51
+ 4. Open the PR with a clear description of what and why
52
+
53
+ ---
54
+
55
+ ## Adding a New Scanner Plugin
56
+
57
+ 1. Create `src/quin_scanner/scanners/my_scanner.py` extending `BaseScanner`
58
+ 2. Implement `name() -> str` and `scan(accessor, file_index) -> list[ScanFinding]`
59
+ 3. Register it in `orchestrator.py` `_SCANNER_REGISTRY`
60
+ 4. Add detection rules to the appropriate `rules/*.yaml` file if needed
61
+
62
+ ```python
63
+ from quin_scanner.scanners.base import BaseScanner
64
+ from quin_scanner.models import ScanFinding
65
+ from quin_scanner.repo_accessor import RepoAccessor
66
+ from quin_scanner.file_index import FileIndex
67
+
68
+
69
+ class MyScanner(BaseScanner):
70
+ def name(self) -> str:
71
+ return "my_scanner"
72
+
73
+ def scan(self, accessor: RepoAccessor, file_index: FileIndex) -> list[ScanFinding]:
74
+ findings = []
75
+ for path in file_index.glob("**/*.ext"):
76
+ content = accessor.read_file(path)
77
+ # detect and append ScanFinding objects
78
+ return findings
79
+ ```
80
+
81
+ ## Adding Framework Detection Rules
82
+
83
+ Framework rules live in `src/quin_scanner/rules/`. Add entries to:
84
+
85
+ - `dependencies.yaml` — package names per ecosystem
86
+ - `code_patterns.yaml` — regex import/call patterns per language
87
+ - `frameworks.yaml` — config file names with confidence and capability tags
88
+
89
+ No code changes needed for most new frameworks — just YAML.
90
+
91
+ ---
92
+
93
+ ## Code Style
94
+
95
+ - Python 3.11+ with type hints on all public functions
96
+ - Dataclasses for data models (not Pydantic)
97
+ - `pathlib.Path` for all filesystem operations
98
+ - No hardcoded detection rules — use YAML rule files
99
+ - No docstrings on internal helpers — only on public APIs
100
+ - Keep functions small and focused; prefer composition over inheritance
101
+
102
+ ---
103
+
104
+ ## Commit Messages
105
+
106
+ Use the imperative mood and keep the subject under 72 characters:
107
+
108
+ ```
109
+ feat: add support for Bedrock runtime scanner
110
+ fix: handle empty notebook cells in jupyter scanner
111
+ docs: update framework list in README
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Project Roadmap
117
+
118
+ Features are released in numbered drops. The full plan is in [`docs/plans/2026-03-31-quin-agent-scanner-drop-plan.md`](docs/plans/2026-03-31-quin-agent-scanner-drop-plan.md).
119
+
120
+ | Drop | Theme | Status |
121
+ |---|---|---|
122
+ | v0.1.0 | Scan Any Repo for AI | ✅ Released |
123
+ | v0.2.0 | Understand the Risk | Planned |
124
+ | v0.3.0 | Prove Compliance | Planned |
125
+ | v0.4.0 | Automate in CI | Planned |
126
+ | v0.5.0 | Scale to the Org | Planned |
127
+ | v0.6.0 | Generate the Guardrails | Planned |
128
+ | v0.7.0 | Make It Yours | Planned |
129
+
130
+ If your contribution fits a planned drop, reference it in your PR.
131
+
132
+ ---
133
+
134
+ ## Questions?
135
+
136
+ Open a [GitHub Discussion](https://github.com/quin-scanner/quin-agent-scanner/discussions) or file an issue.
@@ -0,0 +1,183 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship made available under
36
+ the License, as indicated by a copyright notice that is included in
37
+ or attached to the work (an example is provided in the Appendix below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean, as submitted to the Licensor for inclusion
48
+ in the Work by the copyright owner or by an individual or Legal Entity
49
+ authorized to submit on behalf of the copyright owner. For the purposes
50
+ of this definition, "submitted" means any form of electronic, verbal,
51
+ or written communication sent to the Licensor or its representatives,
52
+ including but not limited to communication on electronic mailing lists,
53
+ source code control systems, and issue tracking systems that are managed
54
+ by, or on behalf of, the Licensor for the purpose of developing and
55
+ improving the Work, but excluding communication that is conspicuously
56
+ marked or designated in writing by the copyright owner as "Not a
57
+ Contribution."
58
+
59
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
60
+ whom a Contribution has been received by the Licensor and included
61
+ within the Work.
62
+
63
+ 2. Grant of Copyright License. Subject to the terms and conditions of
64
+ this License, each Contributor hereby grants to You a perpetual,
65
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
66
+ copyright license to reproduce, prepare Derivative Works of,
67
+ publicly display, publicly perform, sublicense, and distribute the
68
+ Work and such Derivative Works in Source or Object form.
69
+
70
+ 3. Grant of Patent License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ (except as stated in this section) patent license to make, have made,
74
+ use, offer to sell, sell, import, and otherwise transfer the Work,
75
+ where such license applies only to those patent claims licensable
76
+ by such Contributor that are necessarily infringed by their
77
+ Contribution(s) alone or by the combined work (in which such
78
+ Contribution(s) was submitted. If You institute patent litigation
79
+ against any entity (including a cross-claim or counterclaim in a
80
+ lawsuit) alleging that the Work or any Contribution embodied within
81
+ the Work constitutes direct or contributory patent infringement,
82
+ then any and all patent licenses granted to You under this License
83
+ for that Work shall terminate as of the date such litigation is filed.
84
+
85
+ 4. Redistribution. You may reproduce and distribute copies of the
86
+ Work or Derivative Works thereof in any medium, with or without
87
+ modifications, and in Source or Object form, provided that You
88
+ meet the following conditions:
89
+
90
+ (a) You must give any other recipients of the Work or Derivative
91
+ Works a copy of this License; and
92
+
93
+ (b) You must cause any modified files to carry prominent notices
94
+ stating that You changed the files; and
95
+
96
+ (c) You must retain, in the Source form of any Derivative Works
97
+ that You distribute, all copyright, patent, trademark, and
98
+ attribution notices from the Source form of the Work,
99
+ excluding those notices that do not pertain to any part of
100
+ the Derivative Works; and
101
+
102
+ (d) If the Work includes a "NOTICE" text file as part of its
103
+ distribution, You must include a readable copy of the
104
+ attribution notices contained within such NOTICE file, in
105
+ at least one of the following places: within a NOTICE text
106
+ file distributed as part of the Derivative Works; within
107
+ the Source form or documentation, if provided along with the
108
+ Derivative Works; or, within a display generated by the
109
+ Derivative Works, if and wherever such third-party notices
110
+ normally appear. The contents of the NOTICE file are for
111
+ informational purposes only and do not modify the License.
112
+ You may add Your own attribution notices within Derivative
113
+ Works that You distribute, alongside or in addition to the
114
+ NOTICE text from the Work, provided that such additional
115
+ attribution notices cannot be construed as modifying the License.
116
+
117
+ You may add Your own license statement for Your modifications and
118
+ may provide additional grant of rights to use, copy, modify, merge,
119
+ publish, distribute, sublicense, and/or sell copies of Your
120
+ Derivative Works, and to permit persons to whom the Derivative Works
121
+ is furnished to do so.
122
+
123
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
124
+ any Contribution intentionally submitted for inclusion in the Work
125
+ by You to the Licensor shall be under the terms and conditions of
126
+ this License, without any additional terms or conditions.
127
+ Notwithstanding the above, nothing herein shall supersede or modify
128
+ the terms of any separate license agreement you may have executed
129
+ with Licensor regarding such Contributions.
130
+
131
+ 6. Trademarks. This License does not grant permission to use the trade
132
+ names, trademarks, service marks, or product names of the Licensor,
133
+ except as required for reasonable and customary use in describing the
134
+ origin of the Work and reproducing the content of the NOTICE file.
135
+
136
+ 7. Disclaimer of Warranty. Unless required by applicable law or
137
+ agreed to in writing, Licensor provides the Work (and each
138
+ Contributor provides its Contributions) on an "AS IS" BASIS,
139
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
140
+ implied, including, without limitation, any warranties or conditions
141
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
142
+ PARTICULAR PURPOSE. You are solely responsible for determining the
143
+ appropriateness of using or reproducing the Work and assume any
144
+ risks associated with Your exercise of permissions under this License.
145
+
146
+ 8. Limitation of Liability. In no event and under no legal theory,
147
+ whether in tort (including negligence), contract, or otherwise,
148
+ unless required by applicable law (such as deliberate and grossly
149
+ negligent acts) or agreed to in writing, shall any Contributor be
150
+ liable to You for damages, including any direct, indirect, special,
151
+ incidental, or exemplary damages of any character arising as a
152
+ result of this License or out of the use or inability to use the
153
+ Work (including but not limited to damages for loss of goodwill,
154
+ work stoppage, computer failure or malfunction, or all other
155
+ commercial damages or losses), even if such Contributor has been
156
+ advised of the possibility of such damages.
157
+
158
+ 9. Accepting Warranty or Liability. While redistributing the Work or
159
+ Derivative Works thereof, You may choose to offer, and charge a fee
160
+ for, acceptance of support, warranty, indemnity, or other liability
161
+ obligations and/or rights consistent with this License. However, in
162
+ accepting such obligations, You may offer only obligations consistent
163
+ with this License and not in direct conflict with this License, and
164
+ only if You agree to defend, indemnify, and hold each Contributor
165
+ harmless for any liability incurred by, or claims asserted against,
166
+ such Contributor by reason of your accepting any such warranty or
167
+ additional liability.
168
+
169
+ END OF TERMS AND CONDITIONS
170
+
171
+ Copyright 2026 Quin Agent Scanner Contributors
172
+
173
+ Licensed under the Apache License, Version 2.0 (the "License");
174
+ you may not use this file except in compliance with the License.
175
+ You may obtain a copy of the License at
176
+
177
+ http://www.apache.org/licenses/LICENSE-2.0
178
+
179
+ Unless required by applicable law or agreed to in writing, software
180
+ distributed under the License is distributed on an "AS IS" BASIS,
181
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
182
+ implied. See the License for the specific language governing
183
+ permissions and limitations under the License.