How thecybersandeep/ipaauditor works
1. Overall shape
- IPA Auditor is a static, client-side IPA analysis app: a single-page HTML/JS site that runs entirely in the browser.
- There is no backend service and no build pipeline. The repo is designed to be opened directly, or hosted as a static site on GitHub Pages/Netlify/Cloudflare Pages.
2. Entry and presentation layer
- index.html is the app shell.
- src/styles.css provides the UI styling and theme.
- src/main.js owns the browser UI: drag-and-drop/file selection, tab switching, search, progress updates, result rendering, and export actions.
3. Execution boundary: main thread vs worker
- Heavy analysis is offloaded to src/analyzer.worker.js so the UI stays responsive during IPA inspection.
- The app falls back to running analysis on the main thread when the page is loaded from file://, because Web Worker spawning can be unreliable there.
- This is the main architectural boundary: UI orchestration in main.js versus analysis work in the worker/core modules.
4. Analysis orchestration
- src/core/analyzer.js is the central orchestrator for the scan.
- It coordinates file extraction, metadata parsing, rule execution, secret detection, and aggregation into a single report model.
- The analyzer is intentionally DOM-free so it can run identically in the worker or fallback path.
5. IPA / bundle ingestion flow
- The dropped .ipa is treated as an archive and unpacked using vendored libraries in lib/ such as JSZip.
- The app then traverses the app bundle and inspects key artifacts:
- the Mach-O executable
- embedded.mobileprovision
- Info.plist
- other text files inside the bundle
- This creates the input set for the rest of the security checks.
6. Binary inspection subsystem
- src/core/macho.js parses the Mach-O executable and extracts load commands, symbols, code-signing metadata, encryption flags, and security-relevant header bits.
- The README indicates checks such as MH_PIE, LC_ENCRYPTION_INFO_64, LC_CODE_SIGNATURE, and symbol table analysis are derived from actual binary flags rather than string matching.
- This subsystem feeds findings for checksec-like posture and binary-level security flags.
7. Provisioning and plist subsystem
- src/core/provisioning.js extracts and interprets the embedded provisioning profile from its CMS/PKCS#7 wrapper.
- src/core/plist.js handles both XML and binary plist parsing, which is used for Info.plist and provisioning payloads.
- These modules surface signing identity data, certificate details, distribution type, entitlements, and app configuration metadata.
8. ATS and entitlement analysis
- src/core/ats.js performs per-domain App Transport Security evaluation, including HTTP usage, minimum TLS version, forward secrecy, Certificate Transparency, and pinning-related checks.
- Entitlement risk checks are handled through the rules/analysis layer and focus on sensitive flags such as get-task-allow, sandbox bypass-related entitlements, network extension, and VPN capabilities.
- This is a distinct metadata-analysis lane separate from binary parsing.
9. Secret detection and heuristic scanning
- src/core/entropy.js combines Shannon entropy scoring with vendor-specific regex detection to reduce false positives.
- The scanner runs across bundle text files and strings extracted from the binary, looking for secrets such as AWS, Stripe, GitHub, Slack, SendGrid, JWT, PEMs, and similar credentials.
- Findings carry confidence values, which makes this subsystem heuristic rather than deterministic.
10. Rule engine
- src/core/rules.js holds the rule registry and tracker registry for the report’s broader security checks.
- The repo describes 60+ rule-based checks aligned to OWASP MASVS, so this layer acts as the policy engine that turns parsed facts into findings.
- In architecture terms, this is the “decision” layer sitting on top of the parsers and detectors.
11. Report generation and export
- src/core/export.js formats the analysis output for machine-readable exports: JSON, CSV, and SARIF 2.1.
- src/core/pdf.js builds a human-readable PDF report.
- These exports consume the same unified analysis model produced by the orchestrator, so presentation/export is separated from scanning logic.
12. Runtime constraints and dependencies
- The app depends on vendored browser-side libraries in lib/:
- JSZip for archive extraction
- plist.js for plist parsing
- jsPDF for PDF generation
- Because everything runs in-browser, the architecture is constrained by memory and tab runtime limits rather than server capacity.
13. Security and privacy boundary
- The user’s IPA is read into memory locally and never leaves the tab.
- There is no telemetry or cookie-based tracking; the only persisted preference is theme selection via localStorage.
- This privacy stance is a core architectural property, not just a product claim.
14. Deployment model
- The presence of CNAME, robots.txt, sitemap.xml, and static assets like 404.html indicates a static website deployment model.
- The repo is therefore best understood as a static SPA + worker + analysis core + export pipeline, with all security processing performed entirely on the client side.
Main entry points: analyzer.js Analyzer · rules.js Rules engine · main.js Main UI · index.html index.html
Components 17
Client app
Browser-side shell, interaction, styling, and worker orchestration.
- index.html · Single-page entry document for the client-side app.
index.html - Main UI · Handles file input, tabs, search, progress, rendering, and exports in the main thread.
src/main.js - Styles · Theme and layout styling for the interface.
src/styles.css - Analyzer worker · Runs heavy IPA analysis off the UI thread when workers are available.
src/analyzer.worker.js
Analysis core
DOM-free modules that parse IPA artifacts, score risks, and assemble reports.
- Analyzer · Coordinates extraction, parsing, rule execution, secret detection, and report assembly.
src/core/analyzer.js - Mach-O parser · Extracts load commands, symbols, code-signing data, and security flags from the executable.
src/core/macho.js - Provisioning · Parses embedded mobileprovision data and surfaces certificate, entitlement, and distribution details.
src/core/provisioning.js - Plist parser · Handles XML and binary plist parsing for app and signing metadata.
src/core/plist.js - ATS checks · Evaluates App Transport Security settings and domain-level TLS/pinning posture.
src/core/ats.js - Secret scan · Combines entropy scoring and pattern matching to find likely secrets in text and strings.
src/core/entropy.js - Rules engine · Maps parsed facts to MASVS-aligned findings and tracking rules.
src/core/rules.js
Export pipeline
Formatting and report generation from the unified analysis model.
- Exports · Formats unified results as JSON, CSV, and SARIF 2.1.
src/core/export.js - PDF report · Builds the printable analysis report.
src/core/pdf.js
Vendored libs
Browser libraries used for archive parsing, plist handling, and PDF output.
Other components
- Static site · Static hosting artifacts such as 404 handling, robots, sitemap, and CNAME.
Connections 20
- index.html → Main UI: loads · Bootstraps the single-page application.
- index.html → Styles: styles · Applies the UI theme and layout.
- Main UI → Analyzer worker: dispatches · Sends IPA analysis jobs to a worker when supported.
- Main UI → Analyzer: fallbacks to · Runs analysis on the main thread when workers are unavailable.
- Analyzer worker → Analyzer: invokes · Worker delegates scan execution to the core analyzer.
- Analyzer → JSZip: unzips · Reads the IPA archive contents.
- Analyzer → Mach-O parser: parses · Inspects the app executable for binary security flags.
- Analyzer → Provisioning: reads · Extracts signing and entitlement metadata.
- Analyzer → Plist parser: parses · Loads Info.plist and provisioning plists.
- Analyzer → ATS checks: evaluates · Checks ATS posture and per-domain transport policy.
- Analyzer → Secret scan: scans · Runs secret and heuristic detection across bundle contents.
- Analyzer → Rules engine: scores · Converts parsed facts into policy findings.
- Mach-O parser → Rules engine: feeds · Binary posture results inform rule evaluation.
- Provisioning → Rules engine: feeds · Signing and entitlement facts inform rule evaluation.
- ATS checks → Rules engine: feeds · Network policy findings are passed into the rules layer.
- Secret scan → Rules engine: feeds · Secret-detection hits become findings.
- Analyzer → Exports: outputs · Provides the unified report model for machine exports.
- Analyzer → PDF report: outputs · Provides the unified report model for the PDF report.
- PDF report → jsPDF: uses · Relies on jsPDF for document generation.
- Static site → index.html: hosts · Static deployment serves the app shell and site assets.