microsoft/ApplicationInspector
A source code analyzer built for surfacing features of interest and other characteristics to answer the question 'What's in the code?' quickly using static analysis with a json based rules engine. Ideal for scanning components before use or detecting feature level changes.
Healthy across all four use cases
Permissive license, no critical CVEs, actively maintained — safe to depend on.
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓Last commit 3mo ago
- ✓12 active contributors
- ✓MIT licensed
Show 3 more →Show less
- ✓Tests present
- ⚠Single-maintainer risk — top contributor 80% of recent commits
- ⚠No CI workflows detected
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Healthy" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/microsoft/applicationinspector)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/microsoft/applicationinspector on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: microsoft/ApplicationInspector
Generated by RepoPilot · 2026-05-10 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/microsoft/ApplicationInspector shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
GO — Healthy across all four use cases
- Last commit 3mo ago
- 12 active contributors
- MIT licensed
- Tests present
- ⚠ Single-maintainer risk — top contributor 80% of recent commits
- ⚠ No CI workflows detected
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live microsoft/ApplicationInspector
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/microsoft/ApplicationInspector.
What it runs against: a local clone of microsoft/ApplicationInspector — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in microsoft/ApplicationInspector | Confirms the artifact applies here, not a fork |
| 2 | License is still MIT | Catches relicense before you depend on it |
| 3 | Default branch main exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 111 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of microsoft/ApplicationInspector. If you don't
# have one yet, run these first:
#
# git clone https://github.com/microsoft/ApplicationInspector.git
# cd ApplicationInspector
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of microsoft/ApplicationInspector and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "microsoft/ApplicationInspector(\\.git)?\\b" \\
&& ok "origin remote is microsoft/ApplicationInspector" \\
|| miss "origin remote is not microsoft/ApplicationInspector (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
&& ok "license is MIT" \\
|| miss "license drift — was MIT at generation time"
# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
&& ok "default branch main exists" \\
|| miss "default branch main no longer exists"
# 4. Critical files exist
test -f "AppInspector.RulesEngine/RuleProcessor.cs" \\
&& ok "AppInspector.RulesEngine/RuleProcessor.cs" \\
|| miss "missing critical file: AppInspector.RulesEngine/RuleProcessor.cs"
test -f "AppInspector.RulesEngine/Rule.cs" \\
&& ok "AppInspector.RulesEngine/Rule.cs" \\
|| miss "missing critical file: AppInspector.RulesEngine/Rule.cs"
test -f "AppInspector.CLI/Program.cs" \\
&& ok "AppInspector.CLI/Program.cs" \\
|| miss "missing critical file: AppInspector.CLI/Program.cs"
test -f "AppInspector.RulesEngine/Ruleset.cs" \\
&& ok "AppInspector.RulesEngine/Ruleset.cs" \\
|| miss "missing critical file: AppInspector.RulesEngine/Ruleset.cs"
test -f "AppInspector.RulesEngine/OatExtensions/ApplicationInspectorAnalyzer.cs" \\
&& ok "AppInspector.RulesEngine/OatExtensions/ApplicationInspectorAnalyzer.cs" \\
|| miss "missing critical file: AppInspector.RulesEngine/OatExtensions/ApplicationInspectorAnalyzer.cs"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 111 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~81d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/microsoft/ApplicationInspector"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
Application Inspector is a static source code analyzer that uses a JSON-based rules engine with 400+ patterns to identify coding features, APIs, frameworks, and security-relevant characteristics across multiple languages without performing traditional vulnerability detection. It surfaces 'what the code does' through pattern matching on file operations, cryptography, cloud APIs, and framework usage rather than judging code quality. Multi-project .NET solution: AppInspector.CLI is the command-line entry point wrapping core analysis logic; AppInspector.Common houses shared utilities and exceptions; AppInspector.Benchmarks provides performance testing. CLI output is templated via Liquid partials in html/partials/ (_file_listing.liquid, _report_overview.liquid) and rendered through multiple Writers (AnalyzeHtmlWriter, AnalyzeJsonWriter, AnalyzeSarifWriter, etc.). Rule definitions are JSON-based, loaded at runtime.
👥Who it's for
Security researchers, component vetting teams, and open-source auditors who need to quickly characterize untrusted third-party code or track feature-level changes in components before integration, using automated static analysis instead of manual code review.
🌱Maturity & risk
Production-ready and actively maintained by Microsoft. The project has significant industry recognition (featured on Microsoft.com, ZDNet, SecurityWeek), a published NuGet package, and comprehensive CI/CD (CodeQL workflows visible in .github). Monolithic .NET solution with multiple output formats (HTML, JSON, SARIF, Markdown, text) indicates maturity, though commit recency should be verified in git history.
Low risk: Microsoft-backed with established CI/CD pipelines and SARIF export support for toolchain integration. Risk factors are minimal given the large C# codebase (686KB) and structured rule engine approach. Primary risk is dependency tracking across supported languages—C, C++, Java, JavaScript, Python, Go, Ruby, PowerShell—which may require rule updates as libraries evolve.
Active areas of work
Active development on output format expansion (SARIF export for toolchain integration) and writer architecture (CmdResultsWriter, WriterFactory pattern). Benchmark suite (DistinctBenchmarks.cs, AnalyzeBenchmark.cs) suggests recent optimization focus. GitHub issue templates and Copilot instructions indicate community engagement and automation tooling.
🚀Get running
Clone the repo: git clone https://github.com/microsoft/ApplicationInspector.git. Build with dotnet build. Run CLI: dotnet run --project AppInspector.CLI -- analyze --source-path <target> --output-file-format html. Inspect AppInspector.CLI/Program.cs and CLICmdOptions.cs for available commands (analyze, export-tags, verify-rules, tag-diff).
Daily commands:
dotnet build to compile; dotnet run --project AppInspector.CLI -- analyze --source-path <path> to analyze code; dotnet run --project AppInspector.CLI -- export-tags to list available tags; dotnet run --project AppInspector.Benchmarks to run performance benchmarks.
🗺️Map of the codebase
AppInspector.RulesEngine/RuleProcessor.cs— Core engine that processes rules against source code; every rule execution flows through this file, making it foundational to the entire analyzerAppInspector.RulesEngine/Rule.cs— Defines the Rule data model and schema that all JSON-based rules conform to; essential for understanding how rules are structured and loadedAppInspector.CLI/Program.cs— CLI entry point that orchestrates command routing (analyze, export-tags, verify-rules, tag-diff, pack-rules); every user interaction starts hereAppInspector.RulesEngine/Ruleset.cs— Manages collections of rules, versioning, and rule loading; acts as the container abstraction for all rule setsAppInspector.RulesEngine/OatExtensions/ApplicationInspectorAnalyzer.cs— Bridges OAT (Object Analysis Tool) framework with Application Inspector analysis; key extension point for pattern matching operationsAppInspector.CLI/ResultsWriter.cs— Orchestrates output formatting and writing of analysis results; coordinates all writer implementations (JSON, HTML, SARIF, Markdown, Text)AppInspector.RulesEngine/TextContainer.cs— Abstracts file content and scanning logic; handles language detection and content iteration for pattern matching
🛠️How to make changes
Add a new rule pattern
- Create or edit a JSON rule file in the rules directory with pattern, conditions, tags, severity, and confidence (
AppInspector.RulesEngine/Rule.cs) - Define SearchPattern objects with PatternType (Regex or Substring) and PatternScope (All, Comments, Strings, Code) (
AppInspector.RulesEngine/SearchPattern.cs) - Run verify-rules command to validate rule syntax (
AppInspector.RulesEngine/RulesVerifier.cs) - Test with analyze command against sample code (
AppInspector.CLI/Program.cs)
Add a new output format writer
- Create a new writer class inheriting from CmdResultsWriter in Writers directory (
AppInspector.CLI/Writers/CmdResultsWriter.cs) - Implement WriteResults() method to format AnalyzeResult data (
AppInspector.CLI/Writers/AnalyzeJsonWriter.cs) - Register the writer in WriterFactory.GetWriter() method (
AppInspector.CLI/Writers/WriterFactory.cs) - Add output format option to CLICmdOptions and route in Program.cs (
AppInspector.CLI/CLICmdOptions.cs)
Add a new language for analysis
- Add language entry to languages.json with file extensions and comment syntax (
AppInspector.RulesEngine/Resources/languages.json) - The Languages registry will automatically load and recognize files with those extensions (
AppInspector.RulesEngine/Languages.cs) - TextContainer will detect language and apply correct comment filtering during scans (
AppInspector.RulesEngine/TextContainer.cs)
Add a new OAT pattern matching operation
- Create operation class in OatExtensions directory implementing OAT operation interface (
AppInspector.RulesEngine/OatExtensions/OatRegexWithIndexOperation.cs) - Implement Execute() method returning operation results (
AppInspector.RulesEngine/OatExtensions/WithinOperation.cs) - Register operation in ApplicationInspectorAnalyzer GetOperations() method (
AppInspector.RulesEngine/OatExtensions/ApplicationInspectorAnalyzer.cs) - Define OAT clause class for rule JSON serialization (
AppInspector.RulesEngine/OatExtensions/WithinClause.cs)
🪤Traps & gotchas
Rule file location not visible in provided file list—rules are loaded at runtime; verify where rule JSON files are stored (likely a rules/ directory or embedded resource not shown). Liquid template syntax in html/partials requires Liquid.NET or similar; ensure the templating library version matches expectations. HTML output depends on Bootstrap CSS and Font Awesome icons bundled in html/resources/css/; missing or outdated versions break styling. SARIF output requires specific field mapping; check AnalyzeSarifWriter.cs for version compliance (SARIF 2.1 vs earlier). Benchmarks project may require specific .NET SDK version; check AppInspector.Benchmarks.csproj for TargetFramework.
🏗️Architecture
💡Concepts to learn
- Rules Engine (JSON-based pattern matching) — Application Inspector's core differentiator is declaring analysis rules as JSON patterns rather than hardcoded logic; understanding how rules are structured, loaded, and matched against code is essential for extending the tool or debugging false positives.
- Static Source Code Analysis — The project uses regex and lexical pattern matching without executing code; understanding the limitations (no data-flow analysis, no type inference) explains why it excels at feature detection but not vulnerability classification.
- Liquid Templating — HTML report generation relies on Liquid templates in html/partials/; contributors modifying report layout or structure must understand Liquid syntax and the data model passed from AnalyzeHtmlWriter.cs.
- Factory Pattern (WriterFactory) — Output format extensibility is achieved through WriterFactory decoupling format selection from instantiation; new output formats (SARIF, Markdown, XLSX) are added by creating new Writer classes and registering them, not modifying existing code.
- SARIF (Static Analysis Results Interchange Format) — Application Inspector exports results in SARIF format for toolchain integration (CI/CD, Azure DevOps); understanding SARIF schema (rules, runs, results) is necessary for contributing AnalyzeSarifWriter.cs improvements or consuming results downstream.
- Multi-language AST/Lexical Analysis — Supporting C, C++, Java, JavaScript, Python, Go, Ruby, PowerShell requires language-specific parsing strategies; the codebase likely contains language adapters or regex patterns tuned per language, making rule maintenance and accuracy challenging across platforms.
- Tag-based Feature Classification — Results are organized by semantic tags (encryption, cloud-api, file-io, etc.) grouped in tagreportgroups.json; understanding the tag taxonomy is critical for query filtering, report generation, and rule categorization.
🔗Related repos
microsoft/Pricetag— Sister project providing a GUI/web interface wrapper for Application Inspector analysis results and tag explorationsecurego/gosec— Comparable static analyzer for Go; same problem space (security-relevant code characterization) with language-specific pattern matchingowasp/dependency-check— Complementary tool for dependency vulnerability scanning; often used alongside Application Inspector for comprehensive component vettingShiftLeftSecurity/sast-scan— Meta-scanner orchestrating multiple static analyzers (including Application Inspector); useful for learning integration patterns and output synthesisgithub/semgrep— Modern alternative with rule-based code pattern detection using its own DSL; competitive approach to the same static analysis problem at scale
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add comprehensive unit tests for OatExtensions analyzer components
The AppInspector.RulesEngine/OatExtensions/ directory contains critical rule conversion and analysis logic (ApplicationInspectorAnalyzer.cs, ConvertedOatRule.cs) but no corresponding test files are visible in the repo structure. This is a high-value area since the OAT (Operation Abstraction Tree) extension system is core to the rules engine. New contributors can create a test project to validate rule conversion edge cases, pattern matching behavior, and confidence scoring.
- [ ] Create AppInspector.RulesEngine.Tests project if it doesn't exist
- [ ] Add unit tests for ApplicationInspectorAnalyzer.cs covering different rule types and pattern matching scenarios
- [ ] Add unit tests for ConvertedOatRule.cs covering rule conversion from OAT format
- [ ] Test boundary conditions and error handling for malformed rules
- [ ] Ensure tests cover both positive and negative rule matching cases
Add format-specific writer tests for output serialization
The AppInspector.CLI/Writers/ directory contains multiple specialized output writers (AnalyzeSarifWriter.cs, AnalyzeHtmlWriter.cs, AnalyzeJsonWriter.cs, etc.) but no dedicated test files are listed. These writers are critical for producing valid output in different formats (SARIF, HTML, JSON, Markdown). A new contributor should create tests to validate output structure, proper escaping, and format compliance.
- [ ] Create AppInspector.CLI.Tests project or add Writers test folder
- [ ] Add unit tests for AnalyzeSarifWriter.cs validating SARIF schema compliance
- [ ] Add unit tests for AnalyzeJsonWriter.cs and AnalyzeHtmlWriter.cs for proper serialization
- [ ] Test edge cases: special characters, null values, large datasets
- [ ] Add integration tests using sample analysis results across all writers
Add missing unit test coverage for RulesEngine core types
Key domain model files in AppInspector.RulesEngine/ like MatchRecord.cs, Location.cs, Boundary.cs, Confidence.cs, and Comment.cs are fundamental to analysis results but have no visible test files. These types need validation for correctness in serialization, comparison, and data integrity. This is essential for ensuring reliable rule matching and reporting.
- [ ] Create AppInspector.RulesEngine.Tests project
- [ ] Add tests for MatchRecord.cs covering serialization, equality comparison, and metadata handling
- [ ] Add tests for Location.cs and Boundary.cs for coordinate validation and edge cases
- [ ] Add tests for Confidence.cs enum handling and parsing from rule definitions
- [ ] Add tests for Comment.cs type handling and text formatting
- [ ] Test round-trip serialization/deserialization for these core types
🌿Good first issues
- Add unit tests for ResultsWriter.cs (AppInspector.CLI/ResultsWriter.cs is a central orchestrator but no test file visible)—contribute by creating AppInspector.Tests/ResultsWriterTests.cs with happy-path and error cases.
- Expand AnalyzeMarkdownWriter.cs with table-of-contents generation and syntax highlighting for code snippets in Markdown output—requires adding anchor links and code fence formatting.
- Add support for outputting tag statistics (counts per category) to AnalyzeTextWriter.cs—extend the text writer to emit a summary table matching the HTML report's tag distribution overview.
⭐Top contributors
Click to expand
Top contributors
- @gfs — 80 commits
- @Copilot — 5 commits
- @danfiedler-msft — 4 commits
- @scovetta — 2 commits
- @dbalikhin — 2 commits
📝Recent commits
Click to expand
Recent commits
3b89116— Add detection for AWS credential-returning API calls (#637) (Copilot)48da27b— Add Copilot instructions for repository context (#640) (Copilot)803b13c— Add .NET 10 as a build target and update test matrix (#632) (Copilot)d174577— Fix JSON validation errors and add comprehensive rule samples (#633) (Copilot)fdad01d— Add markdown output format for CI environments with key features summary (#630) (Copilot)0b8c96e— move pipelines to new org (#631) (danfiedler-msft)ac02771— Add Mechanism to construct from a string representation of JSON Schema (#629) (gfs)a6e3e7e— Update Dependencies (#628) (gfs)44d7fd4— Add JSON schema validation for rules and tests (#626) (gfs)e33c40a— Add YamlPath support and tests to RulesEngine (#627) (gfs)
🔒Security observations
Application Inspector is a static analysis tool with a moderate security posture. The primary concerns are around regex-based rule processing (ReDoS risk), JSON deserialization from rule files, potential X
- Medium · Potential XSS Vulnerability in HTML Report Generation —
AppInspector.CLI/Writers/AnalyzeHtmlWriter.cs, AppInspector.CLI/html/. The codebase includes HTML report writers (AnalyzeHtmlWriter.cs) that generate HTML output. Without proper output encoding, user-controlled data (file paths, rule names, match results) could be injected into HTML templates, leading to Cross-Site Scripting (XSS) vulnerabilities when reports are viewed in browsers. Fix: Ensure all dynamic content is properly HTML-encoded before insertion into HTML templates. Use a templating engine with auto-escaping enabled (the codebase uses Liquid templates - verify auto-escaping is configured). Validate and sanitize all user inputs and analysis results before rendering. - Medium · Potential Regex Denial of Service (ReDoS) in Rule Processing —
AppInspector.RulesEngine/OatExtensions/OatRegexWithIndexOperation.cs, AppInspector.RulesEngine/RuleProcessor.cs. The codebase implements a regex-based rules engine (OatExtensions/OatRegexWithIndexOperation.cs, RuleProcessor.cs) that processes user-supplied or external regex patterns from rule files. Maliciously crafted or poorly optimized regular expressions could cause CPU exhaustion and denial of service. Fix: Implement regex timeout mechanisms using Regex constructor with TimeSpan parameter. Validate and test regex patterns before execution. Consider implementing rule complexity analysis to reject overly complex patterns. Add resource limits for rule processing. - Medium · Insecure Deserialization in JSON Rule Loading —
AppInspector.RulesEngine/Ruleset.cs, AppInspector.RulesEngine/AbstractRuleSet.cs, AppInspector.CLI/preferences/tagreportgroups.json. The application loads rules from JSON files (tagreportgroups.json, language resources, etc.). If JSON deserialization is not properly configured, it could be vulnerable to deserialization attacks, especially if rules can come from untrusted sources or if sensitive .NET types are exposed. Fix: Use strongly-typed deserialization models and avoid using BinaryFormatter or NetDataContractSerializer. Implement JSON Schema validation for all incoming rule files. Use JsonSerializerOptions with restrictive type handling. Validate rule sources and implement integrity checks (signatures/hashes). - Low · Missing Input Validation on File Paths —
AppInspector.CLI/Program.cs, AppInspector.RulesEngine/RuleProcessor.cs. As a source code analysis tool, the application processes file paths and directory structures. Insufficient path validation could lead to path traversal vulnerabilities, allowing analysis of files outside intended directories or disclosure of sensitive system files. Fix: Implement strict path validation using Path.GetFullPath() and canonicalization. Verify resolved paths are within intended analysis directories. Use Path.Combine() correctly. Reject paths containing '..' or suspicious traversal patterns. Implement a whitelist of allowed base directories. - Low · Potential Information Disclosure in Error Messages —
AppInspector.Common/OpException.cs, AppInspector.Common/MsgHelp.cs. The exception handling (OpException.cs, MsgHelp.cs) may expose sensitive information about the application's internal structure, file paths, or configuration in error messages and logs that could be visible to users. Fix: Implement sanitized error messages for end users. Log detailed error information securely (files, internal logs) while providing generic messages to CLI output. Avoid exposing full file paths, rule engine internals, or stack traces in user-facing output. - Low · Missing HTTPS/TLS Configuration Verification —
AppInspector.CLI/html/, AppInspector.CLI/Writers/AnalyzeHtmlWriter.cs. If the HTML reports or any web-based features communicate with external services or APIs, there's no visible configuration ensuring HTTPS enforcement or certificate validation. Fix: If external API calls are made, enforce TLS 1.2 or higher. Implement certificate pinning for critical connections. Use HttpClient with secure defaults. Verify and document all external service dependencies.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.