Time Assurance Code Scanner
Open-source, AI-assisted code scanner (tacs) that supports long-horizon time
assurance by identifying potential Y2038 / Y2106-class risks in source code
around 32-bit time_t and related ABI assumptions.
“Assurance” here means systematically identifying and documenting potential time-related risks and evidence for review. TACS contributes to that process; it does not guarantee that all such risks have been found, and it cannot prove a system free of rollover defects.
This repository is the open-source scanner engine and CLI. It is the code-scanning sibling of time_assurance_doc_scanner (tads).
New here? Follow QUICK_START.md — install through a first local scan (no LLM required).
Status
v0.2.0 — stable CLI-first scanning pipeline. Public
result documents use schema_version 1.2 (candidates[], assessments[],
findings[], plus optional meta.llm_provider / meta.reasoning_effort).
Schema 1.1 reports still load and render. See CHANGELOG.md.
| Command | Purpose |
|---|---|
tacs scan |
Scan one local source tree |
tacs repos |
Batch-scan git repos from a JSONL list |
tacs render |
Render public scan JSON (or a batch run) to text/HTML |
tacs detect |
Experimental guess among the 8 ABI/time_t configs |
Default LLM mode for a first run: --llm none (deterministic candidate discovery on the bundled tests/patterns tree; no API key). External LLMs are opt-in via --llm or TACS_LLM_PROVIDER.
| Provider | Typical model | Notes |
|---|---|---|
| (none) | — | Default; discovery-only candidates |
| Ollama Cloud | gpt-oss:120b-cloud |
Recommended optional path; OLLAMA_API_KEY, leave OLLAMA_HOST unset |
| Ollama local | e.g. llama3.1 |
Set OLLAMA_HOST=http://127.0.0.1:11434 |
| OpenAI | e.g. gpt-4.1-mini, opt-in gpt-6-luna |
OPENAI_API_KEY; Luna: `--reasoning-effort none |
| Anthropic / Gemini | see .env.example |
Requires the matching API key |
BYOLLM: bring your own provider; no vendor lock-in. API keys and provider
settings may be supplied through process environment variables or a local
.env; process environment values take precedence.
Privacy (read this)
There is no hosted code vault, but “local” is not the same as “nothing is retained.”
- Source code context may be sent to the LLM provider you configure only when you opt in (
--llm≠none, orTACS_LLM_PROVIDER). That can include complete function bodies and, in later analysis stages, file-leading context plus extracted definitions (typedefs, structs, macros). tacs scanreads your tree in place;tacs reposclones repositories and keeps them in--cache-dir(default.repo_cache, gitignored) so later runs can reuse them. Delete that directory when you are done.- Reports are written only where you ask (
--out/ batch output dirs). Prefer--llm noneor local Ollama for sensitive trees. For local runs, keep private inputs underinputs/and generated artifacts underresults/(both gitignored except their READMEs).
Details: docs/privacy.md.
Principles
- Open source first; model-independent (BYOLLM)
- Explicit environment configuration is the supported path (8 ABI/
time_tconfigs) - Evidence-oriented pipeline with optional multi-stage LLM analysis
- Human review is authoritative — scanner outputs are candidates for review
- Language surface today is C/C++; the project name and CLI are not limited to C forever
- Default scan scope is common C/C++ sources and headers (
**/*.c,**/*.h,**/*.cc,**/*.cpp,**/*.cxx,**/*.hh,**/*.hpp,**/*.hxx);--includereplaces that glob list, not the catalog IR allowlist. See docs/usage/RUNNING_FULL_PIPELINE.md.
Limitations
TACS is an AI-assisted review aid, not an authoritative compliance oracle. Treat outputs as candidates for review, not confirmed defects.
TACS is not a completeness checker. A clean scan does not establish that a codebase is free of Y2038, Y2106, or other time-related rollover risks. Detection depends on the current rules, supported language constructs, environment assumptions, analysis heuristics, and—when enabled—the behavior of the selected LLM.
- False positives and false negatives are expected.
- With
--llm none, findings are discovery locations (oftenabstain) — not LLM-validated issues. - Results vary by model, provider, rules, and
--env-configassumptions. - Wrong or missing environment config can mis-rank risk (prefer an explicit ABI/
time_tconfig). tacs detectis experimental and often low-confidence — not ground truth.- Preprocessor-agnostic scanning means guarded/dead code may still appear as candidates.
- Structural filtering is heuristic today; tree-sitter AST analysis is not implemented in the current release. The
.[full]extra installs tree-sitter for that future work, but installing it changes nothing yet — the filter stays a no-op either way. - No findings ≠ “no time-assurance risk.”
- Human review remains authoritative for severity and remediation before changing production code or ABI choices.
Environment configuration (important)
Scans are only as meaningful as the assumed ABI/time_t model. Prefer an explicit --env-config JSON (see configs/ and docs/env_config.md).
tacs detect can guess among eight configs from Makefiles/CMake. That path is experimental and often low-confidence — use it for convenience, not as ground truth. Batch/repos may fall back when detection is unsure; set an explicit config_override in the JSONL when you know the target.
Quick start
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
tacs version
tacs scan \
--root tests/patterns \
--rules src/tacs/rules/y2038_sample_rules.json \
--env-config configs/example.env_config.json \
--llm none \
--out findings.json
Then open findings.json. For providers, troubleshooting, and batch/render, see QUICK_START.md.
Layout
| Path | Purpose |
|---|---|
src/tacs/ |
Core engine + CLI (scan, repos, render) |
src/config_detector/ |
Experimental build-system config detection |
src/envui/ |
Environment config schema + wizard helpers |
src/report_renderer/ |
Text/HTML report rendering |
configs/ |
Example rules / env configs |
tests/patterns/ |
Bundled example C patterns for local smoke scans |
tests/ |
Unit and pattern tests |
inputs/ |
Optional local run inputs (contents gitignored) |
results/ |
Generated scan/batch output (scans/, batches/, each with a latest symlink; contents gitignored) |
Docs
Start here: QUICK_START.md
| Doc | Status | Purpose |
|---|---|---|
| QUICK_START.md | Current | Install → offline scan → optional LLM |
| docs/privacy.md | Current | Privacy and retention defaults |
| docs/env_config.md | Current | Environment / ABI configuration |
| docs/usage/RUNNING_FULL_PIPELINE.md | Current | Function-first vs legacy pipeline flags |
| docs/usage/CONFIG_DETECTOR_USAGE.md | Current | Experimental tacs detect |
| docs/config_detector.md | Current | Detector design notes |
| docs/report_renderer.md | Current | Text/HTML rendering |
| docs/prd/Scanning-Workflow.md | Design-era | Original TACS scanner workflow design (not CLI source of truth) |
| docs/README.md | Current | Docs index |
| docs/release_checklist.md | Current | Maintainer release / GitHub metadata checklist |
Sibling project: time_assurance_doc_scanner (tads) — documentation / standards scanner.
Contributing
See CONTRIBUTING.md. Deferred non-blocking work is tracked in docs/backlog.md. To report a vulnerability, use SECURITY.md (not a public issue).
License
Licensed under the Apache License, Version 2.0.
Copyright (c) 2026 Y2038.com LLC
Metadata
Release files for time-assurance-code-scanner 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| time_assurance_code_scanner-0.2.0.tar.gz | 398.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| time_assurance_code_scanner-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 697.5 kB
Release files / time_assurance_code_scanner-0.2.0.tar.gz
| Download URL | time_assurance_code_scanner-0.2.0.tar.gz |
|---|---|
| Size | 398.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54908d058927d895dfdccd9d1e3ea789cf82bff53d98534c33be9c587fe6ac36
|
|
BLAKE2b-256 checksum How to use checksums |
5557e8d13fb71a16fd93a4ec4ed5cee5b4c19ebe3294a90bd76e925c08cdd864
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / time_assurance_code_scanner-0.2.0-py3-none-any.whl
| Download URL | time_assurance_code_scanner-0.2.0-py3-none-any.whl |
|---|---|
| Size | 299.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8ba0980ec6a3d527568a5c7c32b300f96a5f2771134ec7378b742f492840654
|
|
BLAKE2b-256 checksum How to use checksums |
c6b7bd6c087303bb6ba4ecb1ffce5a75fde1e67a8ca9d015f7703a70c92355f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for time-assurance-code-scanner 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.