AppScope is a lightweight security audit tool for GitHub organizations and local repositories. It helps engineers answer two practical questions quickly:
- Which repositories grant elevated permissions that deserve review?
- Are private keys or exposed GitHub tokens sitting in a working tree or checked-in assets?
It is designed for GitHub maintainers, security reviewers, and developers who need a fast signal before a broader review begins.
Modern GitHub workflows frequently mix administrative access, automation, and local development environments. A repository can end up with:
- broad repository permissions granted to automation or app integrations,
- private keys accidentally committed to source control,
- leaked GitHub tokens embedded in config files, scripts, or generated artifacts.
AppScope makes those risks visible in a single, CLI-first workflow.
- Checks GitHub organization repositories for admin/push access exposure.
- Scans local directories for private keys and common GitHub token patterns.
- Produces readable terminal output using Rich tables.
- Runs as a Python CLI with minimal setup.
- Focuses on actionable findings rather than noisy output.
AppScope queries the GitHub API for a target organization and flags repositories that currently grant admin or push permissions. These are reported as higher-risk repositories that should be reviewed for least-privilege and lifecycle hygiene.
The scanner walks a directory tree and inspects files for:
- PEM private key headers such as
-----BEGIN PRIVATE KEY----- - common GitHub token patterns, including
ghp_,github_pat_, andghs_token formats
Files matching these patterns are reported with severity levels and file paths.
Findings are printed to the terminal in compact tables so they are easy to triage during incident response or pre-merge review.
GitHub org -> repository permission audit -> findings
|
+-> local directory scan -> PEM / secret detection -> findings
|
+-> formatted CLI report
The tool is intentionally minimal: it inspects the target org via the GitHub REST API and scans the working directory for sensitive material without requiring a full platform or service deployment.
From a local clone of the repository:
python -m pip install -e .This installs the appscope CLI entry point defined in pyproject.toml.
appscope --org <your-org> --token <github-token> --path .Example:
appscope --org acme-platform --token ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --path .If you are only auditing a local directory and do not have a token, you can still run the local scan path with an organization name:
appscope --org acme-platform --path .appscope --help--org: target GitHub organization to audit--token: optional GitHub token used for authenticated API requests--path: local directory to scan; defaults to the current directory
The project currently focuses on the following items:
- repositories with high-privilege
adminorpushpermissions, - private key material stored in repository content,
- common GitHub token patterns embedded in local files.
This is a focused audit tool, not a general-purpose security platform.
AppScope is implemented in Python 3.10+ and uses:
requestsfor GitHub API callspydanticfor configuration modelsrichfor terminal reportingPyJWTandcryptographyas dependencies for broader security tooling work
The scanner intentionally skips .git paths and reads files with UTF-8 fallback behavior to reduce noise when scanning local worktrees.
[*] Auditing organization acme-platform and scanning local files at ....
GitHub Organization Repository Privilege Audit
Repository Risk Level Details
----------- ----------------------- -----------------------------------------------------------
internal-app High Privilege Exposure Repository grants push/admin permissions. Permissions: {...}
Local Credential Leakage Scan (.pem / Tokens)
File Path Artifact Type Severity
---------------------- ------------------------------------------------ --------
.env Exposed GitHub Token / Installation Secret HIGH
app.private-key.pem GitHub App Private Key (.pem) CRITICAL
AppScope is intended for authorized security auditing and internal review. Use it only against GitHub organizations, repositories, and directories you are explicitly permitted to assess.
Do not run it against third-party systems without consent, and avoid using it to exfiltrate credentials or access data outside the scope of a legitimate review.
Contributions are welcome. The project is intentionally compact, so the best improvements usually fit one of these areas:
- broader secret detection coverage,
- clearer reporting and output formatting,
- safer GitHub API permission checks,
- improved docs and examples.
To validate the current behavior locally:
PYTHONPATH=src python -m pytest -qThis project declares MIT licensing in pyproject.toml.
AppScope is a focused security audit utility for GitHub org and local repository hygiene. It is best understood as a practical scanning and review tool rather than a replacement for a full enterprise security suite.
Designed for fast, actionable visibility into GitHub privilege exposure and credential leakage.