-
Notifications
You must be signed in to change notification settings - Fork 0
security
URGithub never runs destructive Git operations. It will not reset, force-push (--force), rebase, or clean your working tree — under any trigger, ever.
flowchart LR
A{Inspection} -->|SAFE| B[CONTINUE]
A -->|UNSAFE| C[BLOCK]
C --> D[REPORT]
The synchronize operation is deliberately conservative:
git fetch
git pull --ff-only # fast-forward only
git commit # only when the policy allows
git pushAuthorization is checked separately from authentication — having a valid login does not mean a repository is pushable, and the two are verified independently.
URGithub authenticates through your GitHub CLI session — it does not store or use its own GitHub credentials.
-
reposcope required. The registration check requires thereposcope on the authenticatedghtoken. Verify withgh auth status. - Never place tokens in config files. Do not copy or manually put GitHub tokens, passwords, private keys, or cloud credentials into URGithub configuration files. URGithub uses the authenticated GitHub CLI session instead.
-
Git identity ≠ GitHub credentials. The
user.name/user.emailyou configure in Git are only the author identity used for commits — they are not your GitHub authentication.
Every file is scanned before anything is pushed. Secrets are matched two ways (both configured under security.*):
.env* *.pem *.key
credentials.json secrets.json *.p12
| What it catches | Example pattern |
|---|---|
| Private keys | -----BEGIN [A-Z ]*PRIVATE KEY----- |
| GitHub tokens | gh[opsur]_[A-Za-z0-9]{20,} |
| AWS access keys | AKIA[0-9A-Z]{16} |
| Google API keys | AIza[0-9A-Za-z\-_]{35} |
| Slack tokens | xox[baprs]-[0-9A-Za-z\-]{10,} |
| Stripe live keys | sk_live_[0-9A-Za-z]{20,} |
| Generic API keys | sk-[A-Za-z0-9_\-]{24,} |
| Inline secrets | `(?i)(api_key |
Files larger than security.max_scan_bytes (default 1 MB) are not fully scanned. Add exceptions via security.allow_files — globs excluded from both the filename check and the content check — when you are certain a match is a false positive.
| Setting | Default | Behavior |
|---|---|---|
limits.warn_file_mb |
50 MB | Warned in the report |
limits.max_file_mb |
100 MB | Blocks sync when block_on_oversize is on (default) |
Synchronization stops and reports when any of these are detected. Each case is journaled and visible in report.html:
| Result | What it means |
|---|---|
blocked: secrets |
Secret patterns detected — by filename and file content |
blocked: oversize files |
Files over the hard size limit |
blocked: divergence |
Local and remote histories diverged — never merged automatically |
blocked: remote unreachable |
Remote inaccessible |
blocked: no push permission |
Authorization failure — no permission to push |
blocked: no remote configured |
No origin remote |
blocked: missing |
Folder missing / not a git repo / quarantined |
skipped |
Dirty tree without commit_policy.auto_commit — never silently commits |
failed |
Fetch / git add / commit / push fails (journaled with the reason) |
A blocked operation is an intentional safety result, not a bug. Do not bypass it — inspect report.html first. One bad repo never blocks the others.
| Rule | Why it exists |
|---|---|
| Rule 0 — No registration → no operations | Unregistered runs only show the setup wizard; nothing else runs |
| Rule 1 — No scan → no sync | The sync engine only touches repositories scanned in the same run |
| Rule 2 — Every run produces a report | Failures and blocks are always visible, never silent |
| Rule 3 — Trigger type does not matter | Scheduled and automatic runs use the same safe pipeline as manual ones |
URGithub will not act on a locally deleted repository without a confirmation chain:
-
deleted_repo_policy.confirm_scans— 3 consecutive scans must flag it. -
deleted_repo_policy.confirm_days— 7 days must pass. -
deleted_repo_policy.require_remote_confirmation— the remote must confirm deletion. -
deleted_repo_policy.require_user_confirmation— you must explicitly confirm.
- Never commit credentials or secrets into any repository — block-on-secrets is the last line of defense. Never commit
.envfiles, private keys, GitHub tokens, password files, cloud credentials, or API keys unless they are intentional test values with no security impact. - Use the least-privilege GitHub token/permission set URGithub can work with — grant the GitHub account and tools only the permissions necessary for the repositories you intend to manage.
- Keep the runtime directory (
urgithub\.urgithub) protected — it holds configuration, registry, and reports. Use normal operating-system permissions to restrict access. - Review
report.htmlfor blocked operations before investigating further — investigate the reason instead of disabling the protection blindly. - Rotate any secret that was ever pushed, even once.
- Secret detection is on by default (
security.block_on_secrets). Anything flagged is reported and never pushed. - To report a vulnerability, open a private advisory on GitHub or email the maintainer.
- Do not post keys or secrets in issues. When reporting a problem, redact GitHub tokens, passwords, private keys, personal access tokens, and private repository contents before opening an issue.
Next: Report & Journal — everything the report and journal record.
Discover · Scan · Synchronize · Commit · Push · Verify · Report — with safety gates and an HTML activity report after every run.
| About | Quick links | Status |
|---|---|---|
| Home · Installation · Architecture | Repositories & Sync · Security · Report & Journal | Configuration · Automation · Operations & Updating |
| FAQ · Troubleshooting · Wiki home | Repository · Issues · Releases |
|
URGithub never runs git reset, --force, rebase, or clean — anything unsafe is blocked and reported, never silently destroyed.
MIT License · © 2026 Ganesh Bakkera · learnerforge/push-to-github
Getting started
- Home — overview, pipeline, quick start
- Installation — requirements, setup wizard, first run
Concepts
- Architecture — one engine, every trigger
- Repositories & Sync — discovery, rename, quarantine, block codes
- Security — safety model, secret detection, blocked operations
-
Report & Journal —
report.htmland the JSONL journal
Operation
-
Configuration — every config key,
--configCLI - Automation — triggers and scheduling per OS
- Operations & Updating — production setup, upgrades, maintenance
Help
- FAQ — common questions
- Troubleshooting — symptoms and fixes
Quick reference
-
--setup· one-time registration wizard -
--scan· discover repositories (never syncs) -
--sync· full safe synchronization -
--report· regeneratereport.html -
--schedule install· install Windows scheduling -
--run manual· run the manual trigger
Repository ↗ · Issues ↗ · Releases ↗
v0.1.0 · MIT License · © 2026 Ganesh Bakkera