kushigaur3103-svg/time-code-security

Deterministic AST-based SAST scanner & closed-loop automated remediation engine for Python.

Python

1

273 commits

updated Sep 19, 2026

See the code

See what people are saying (1)

README

TimeCodeSecurity (TCS) 🛡️

Version Tests Python License

Deterministic AST SAST Scanner, Proof Graph Engine & Automated Closed-Loop Remediation Framework.

TCS scans source code for high-risk vulnerabilities, tracks taint flows across call graphs, verifies reachability in dependencies, and automatically writes syntactically valid patches back to disk with zero hallucinations.


⚡ 10-Second Quickstart

Installation

git clone https://github.com/kushigaur3103-svg/time-code-security.git
cd time-code-security
pip install -e .

CLI Scanning

Run a security scan against a target directory:

tcs scan ./my_project

Operational CLI Modes

CommandPurposeDisk StateExit Code
tcs scan .Standard conservative scan (zero false alarms on uncalled library parameters)Unchanged0 if clean, 1 if active findings
tcs scan . --audit-allSpeculative deep audit (evaluates uncalled parameters as POTENTIAL)Unchanged0 if clean, 1 if findings
tcs scan . --fixRemediation discovery + verified unified diff previewUnchanged (0 bytes altered)1 if fixes available
tcs scan . --fix --writeAuthoritative closed-loop remediation applied atomicallySafely Patched0 on verified write

Automated Remediation

Preview verified remediation patches without modifying files:

tcs scan ./my_project --fix

Apply verified remediation patches directly to disk:

tcs scan ./my_project --fix --write

Note: --fix operates in safe preview mode (dry-run) by default and does not mutate source files. The --write flag is required as explicit mutation permission to write verified patches to disk.

🚀 Try the Live Demo (Windows / Linux / macOS)

# 1. Create a demo workspace
mkdir tcs_demo
cd tcs_demo

# 2. Create vulnerable sample (Python one-liner prevents PowerShell quote stripping)
python -c "open('app.py', 'w').write('import sqlite3\n\ndef get_user(cursor, username):\n    cursor.execute(f\"SELECT * FROM users WHERE name = \x27{username}\x27\")\n    return cursor.fetchone()\n')"

# 3. Preview remediation patch (Color diff displayed, disk unmodified)
tcs scan . --fix

# 4. Atomically apply the verified patch to disk
tcs scan . --fix --write

# 5. Verify the fix (Re-scans clean with Score: 100/100 CLEAN)
tcs scan .

Web UI

Start the local security management interface and API:

uvicorn app:app --port 8000

GitHub Actions Integration

name: Security Audit
on: [push, pull_request]

jobs:
  tcs-scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: kushigaur3103-svg/time-code-security@v1

Contributors

kushigaur3103-svg/time-code-security

Deterministic AST-based SAST scanner & closed-loop automated remediation engine for Python.

Python

1

273 commits

updated Sep 19, 2026

See the code

See what people are saying (1)

README

TimeCodeSecurity (TCS) 🛡️

Version Tests Python License

Deterministic AST SAST Scanner, Proof Graph Engine & Automated Closed-Loop Remediation Framework.

TCS scans source code for high-risk vulnerabilities, tracks taint flows across call graphs, verifies reachability in dependencies, and automatically writes syntactically valid patches back to disk with zero hallucinations.


⚡ 10-Second Quickstart

Installation

git clone https://github.com/kushigaur3103-svg/time-code-security.git
cd time-code-security
pip install -e .

CLI Scanning

Run a security scan against a target directory:

tcs scan ./my_project

Operational CLI Modes

CommandPurposeDisk StateExit Code
tcs scan .Standard conservative scan (zero false alarms on uncalled library parameters)Unchanged0 if clean, 1 if active findings
tcs scan . --audit-allSpeculative deep audit (evaluates uncalled parameters as POTENTIAL)Unchanged0 if clean, 1 if findings
tcs scan . --fixRemediation discovery + verified unified diff previewUnchanged (0 bytes altered)1 if fixes available
tcs scan . --fix --writeAuthoritative closed-loop remediation applied atomicallySafely Patched0 on verified write

Automated Remediation

Preview verified remediation patches without modifying files:

tcs scan ./my_project --fix

Apply verified remediation patches directly to disk:

tcs scan ./my_project --fix --write

Note: --fix operates in safe preview mode (dry-run) by default and does not mutate source files. The --write flag is required as explicit mutation permission to write verified patches to disk.

🚀 Try the Live Demo (Windows / Linux / macOS)

# 1. Create a demo workspace
mkdir tcs_demo
cd tcs_demo

# 2. Create vulnerable sample (Python one-liner prevents PowerShell quote stripping)
python -c "open('app.py', 'w').write('import sqlite3\n\ndef get_user(cursor, username):\n    cursor.execute(f\"SELECT * FROM users WHERE name = \x27{username}\x27\")\n    return cursor.fetchone()\n')"

# 3. Preview remediation patch (Color diff displayed, disk unmodified)
tcs scan . --fix

# 4. Atomically apply the verified patch to disk
tcs scan . --fix --write

# 5. Verify the fix (Re-scans clean with Score: 100/100 CLEAN)
tcs scan .

Web UI

Start the local security management interface and API:

uvicorn app:app --port 8000

GitHub Actions Integration

name: Security Audit
on: [push, pull_request]

jobs:
  tcs-scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: kushigaur3103-svg/time-code-security@v1

Contributors

Languages

Python

84.6%

HTML

12.9%

TypeScript

1.9%