time-assurance-code-scanner 0.2.0rc2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- time_assurance_code_scanner-0.2.0rc2/LICENSE +203 -0
- time_assurance_code_scanner-0.2.0rc2/PKG-INFO +184 -0
- time_assurance_code_scanner-0.2.0rc2/README.md +149 -0
- time_assurance_code_scanner-0.2.0rc2/pyproject.toml +80 -0
- time_assurance_code_scanner-0.2.0rc2/setup.cfg +4 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/__init__.py +11 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/analyzers/__init__.py +9 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/analyzers/architecture.py +188 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/analyzers/time_t_config.py +183 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/build_parsers/__init__.py +10 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/build_parsers/base.py +82 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/build_parsers/cmake.py +113 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/build_parsers/makefile.py +112 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/cache.py +109 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/cli.py +403 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/detector.py +106 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/hybrid_detector.py +384 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/likelihoods.py +166 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/llm_analyzer.py +368 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/output/__init__.py +8 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/output/likelihood.py +314 -0
- time_assurance_code_scanner-0.2.0rc2/src/config_detector/validator.py +147 -0
- time_assurance_code_scanner-0.2.0rc2/src/envui/__init__.py +4 -0
- time_assurance_code_scanner-0.2.0rc2/src/envui/cli/__init__.py +4 -0
- time_assurance_code_scanner-0.2.0rc2/src/envui/cli/derive_fields.py +147 -0
- time_assurance_code_scanner-0.2.0rc2/src/envui/cli/env_wizard.py +381 -0
- time_assurance_code_scanner-0.2.0rc2/src/envui/cli/io_utils.py +139 -0
- time_assurance_code_scanner-0.2.0rc2/src/envui/cli/validate_env.py +156 -0
- time_assurance_code_scanner-0.2.0rc2/src/envui/examples/env_config.sample.json +15 -0
- time_assurance_code_scanner-0.2.0rc2/src/envui/schemas/environment.schema.json +151 -0
- time_assurance_code_scanner-0.2.0rc2/src/report_renderer/__init__.py +8 -0
- time_assurance_code_scanner-0.2.0rc2/src/report_renderer/__main__.py +8 -0
- time_assurance_code_scanner-0.2.0rc2/src/report_renderer/cli.py +165 -0
- time_assurance_code_scanner-0.2.0rc2/src/report_renderer/core.py +535 -0
- time_assurance_code_scanner-0.2.0rc2/src/report_renderer/fixtures/malformed.json +20 -0
- time_assurance_code_scanner-0.2.0rc2/src/report_renderer/fixtures/missing-fields.json +22 -0
- time_assurance_code_scanner-0.2.0rc2/src/report_renderer/fixtures/typical.json +38 -0
- time_assurance_code_scanner-0.2.0rc2/src/report_renderer/renderers.py +743 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/__init__.py +6 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/batch_render_reports.py +434 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/batch_repo_scan.py +390 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/batch_scan_repos.py +1556 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/cli.py +157 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/__init__.py +4 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/alias_scope.py +256 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/arithmetic_scanner.py +212 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/candidate_evidence.py +220 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/candidate_utils.py +238 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/config_validator.py +216 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/define_scanner.py +325 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/discovery_manager.py +389 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/env_capabilities.py +95 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/file_limits.py +68 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/function_analysis_response.py +438 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/function_analyzer.py +458 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/function_llm_client.py +1100 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/function_scanner.py +485 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/function_schemas.py +105 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/include_patterns.py +27 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/io_boundary_analyzer.py +706 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/io_format_parser.py +176 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/ir_adapter.py +465 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/ir_match.py +410 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/llm_client.py +2093 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/llm_errors.py +360 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/llm_logger.py +42 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/llm_prompt.py +45 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/llm_response.py +34 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/logging_config.py +128 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/metrics.py +92 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/migration_analyzer.py +373 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/model_assessment.py +368 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/path_utils.py +190 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/pipeline.py +3363 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/rule_catalog.py +206 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/run_ids.py +34 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/scan_session.py +761 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/schema.py +484 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/source_files.py +149 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/status_logger.py +97 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/struct_filter.py +108 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/core/typedef_scanner.py +246 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/fixtures/repo_lists/test_ilp32_repos.jsonl +7 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/fixtures/repo_lists/test_repos.jsonl +10 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/fixtures/repo_lists/test_time_t_size_repos.jsonl +7 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/llm/__init__.py +43 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/llm/env.py +166 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/llm/factory.py +29 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/llm/openai_models.py +187 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/python/y2038scan_fast_json_group.py +833 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/rules/retired_rule_ids.json +1 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/rules/y2038_sample_rules.json +6134 -0
- time_assurance_code_scanner-0.2.0rc2/src/tacs/scan_command.py +288 -0
- time_assurance_code_scanner-0.2.0rc2/src/time_assurance_code_scanner.egg-info/PKG-INFO +184 -0
- time_assurance_code_scanner-0.2.0rc2/src/time_assurance_code_scanner.egg-info/SOURCES.txt +144 -0
- time_assurance_code_scanner-0.2.0rc2/src/time_assurance_code_scanner.egg-info/dependency_links.txt +1 -0
- time_assurance_code_scanner-0.2.0rc2/src/time_assurance_code_scanner.egg-info/entry_points.txt +2 -0
- time_assurance_code_scanner-0.2.0rc2/src/time_assurance_code_scanner.egg-info/requires.txt +12 -0
- time_assurance_code_scanner-0.2.0rc2/src/time_assurance_code_scanner.egg-info/top_level.txt +4 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_batch_artifact_layout.py +489 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_batch_env_config.py +283 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_candidate_attribution.py +769 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_candidate_evidence.py +932 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_candidate_function_dedupe.py +456 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_config_detector.py +141 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_define_scanner.py +74 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_discovery_output.py +74 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_env_capabilities.py +403 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_env_config_contract.py +195 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_env_schema_integrity.py +495 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_env_wizard.py +63 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_env_wizard_simple.py +130 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_exact_function_ids.py +1093 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_f2_f3_wire_contract_correction.py +578 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_focus_line_mapping.py +49 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_function_recognition.py +881 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_hardware_filtering.py +51 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_html_report_injection.py +153 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_i3c_filtering.py +43 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_include_no_findings.py +59 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_ir_adapter_interpreter.py +66 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_latest_symlink.py +232 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_legacy_stage_wording.py +320 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_license_headers.py +145 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_llm_batch_privacy.py +383 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_llm_env.py +236 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_llm_error_logging_hardening.py +672 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_llm_pass_logging.py +314 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_llm_post_json_errors.py +256 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_logging.py +1040 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_mode_default_parity.py +252 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_model_assessments.py +859 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_openai_gpt6_luna.py +752 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_package_version.py +71 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_path_normalization.py +533 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_prompt_consistency.py +395 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_prompt_trust_boundary.py +649 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_render_cli.py +183 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_repo_scan_timeout.py +786 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_repo_url_credentials.py +188 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_repos_cli.py +263 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_run_ids.py +228 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_scan_overrides_contract.py +761 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_smoke_scan.py +185 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_stable_rule_ids.py +844 -0
- time_assurance_code_scanner-0.2.0rc2/tests/test_typedef_translation_unit_scope.py +533 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Copyright (c) 2026 Y2038.com LLC
|
|
2
|
+
|
|
3
|
+
Apache License
|
|
4
|
+
Version 2.0, January 2004
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
80
|
+
where such license applies only to those patent claims licensable
|
|
81
|
+
by such Contributor that are necessarily infringed by their
|
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
84
|
+
institute patent litigation against any entity (including a
|
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
87
|
+
or contributory patent infringement, then any patent licenses
|
|
88
|
+
granted to You under this License for that Work shall terminate
|
|
89
|
+
as of the date such litigation is filed.
|
|
90
|
+
|
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
93
|
+
modifications, and in Source or Object form, provided that You
|
|
94
|
+
meet the following conditions:
|
|
95
|
+
|
|
96
|
+
(a) You must give any other recipients of the Work or
|
|
97
|
+
Derivative Works a copy of this License; and
|
|
98
|
+
|
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
|
100
|
+
stating that You changed the files; and
|
|
101
|
+
|
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
|
104
|
+
attribution notices from the Source form of the Work,
|
|
105
|
+
excluding those notices that do not pertain to any part of
|
|
106
|
+
the Derivative Works; and
|
|
107
|
+
|
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
|
110
|
+
include a readable copy of the attribution notices contained
|
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
|
113
|
+
of the following places: within a NOTICE text file distributed
|
|
114
|
+
as part of the Derivative Works; within the Source form or
|
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
|
116
|
+
within a display generated by the Derivative Works, if and
|
|
117
|
+
wherever such third-party notices normally appear. The contents
|
|
118
|
+
of the NOTICE file are for informational purposes only and
|
|
119
|
+
do not modify the License. You may add Your own attribution
|
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
122
|
+
that such additional attribution notices cannot be construed
|
|
123
|
+
as modifying the License.
|
|
124
|
+
|
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
|
126
|
+
may provide additional or different license terms and conditions
|
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
130
|
+
the conditions stated in this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
|
179
|
+
|
|
180
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
181
|
+
|
|
182
|
+
To apply the Apache License to your work, attach the following
|
|
183
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
184
|
+
replaced with your own identifying information. (Don't include
|
|
185
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
186
|
+
comment syntax for the file format. We also recommend that a
|
|
187
|
+
file or class name and description of purpose be included on the
|
|
188
|
+
same "printed page" as the copyright notice for easier
|
|
189
|
+
identification within third-party archives.
|
|
190
|
+
|
|
191
|
+
Copyright [yyyy] [name of copyright owner]
|
|
192
|
+
|
|
193
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
194
|
+
you may not use this file except in compliance with the License.
|
|
195
|
+
You may obtain a copy of the License at
|
|
196
|
+
|
|
197
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
198
|
+
|
|
199
|
+
Unless required by applicable law or agreed to in writing, software
|
|
200
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
201
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
202
|
+
See the License for the specific language governing permissions and
|
|
203
|
+
limitations under the License.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: time-assurance-code-scanner
|
|
3
|
+
Version: 0.2.0rc2
|
|
4
|
+
Summary: AI-assisted scanner that supports long-horizon time assurance by identifying potential Y2038/Y2106-class risks in source code.
|
|
5
|
+
Author: Y2038.com LLC
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/y2038-com/time_assurance_code_scanner
|
|
8
|
+
Project-URL: Repository, https://github.com/y2038-com/time_assurance_code_scanner
|
|
9
|
+
Project-URL: Issues, https://github.com/y2038-com/time_assurance_code_scanner/issues
|
|
10
|
+
Project-URL: Documentation, https://github.com/y2038-com/time_assurance_code_scanner#readme
|
|
11
|
+
Keywords: y2038,y2106,time_t,static-analysis,security,c,cpp,time-assurance
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Topic :: Security
|
|
20
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
21
|
+
Requires-Python: >=3.12
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: pydantic>=2.0.0
|
|
25
|
+
Requires-Dist: click>=8.0.0
|
|
26
|
+
Requires-Dist: requests>=2.25.0
|
|
27
|
+
Requires-Dist: jsonschema>=4.0.0
|
|
28
|
+
Provides-Extra: full
|
|
29
|
+
Requires-Dist: tree-sitter>=0.20.0; extra == "full"
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
32
|
+
Requires-Dist: black>=22.0.0; extra == "dev"
|
|
33
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
# Time Assurance Code Scanner
|
|
37
|
+
|
|
38
|
+
Open-source, AI-assisted code scanner (`tacs`) that supports long-horizon **time
|
|
39
|
+
assurance** by identifying potential Y2038 / Y2106-class risks in source code
|
|
40
|
+
around 32-bit `time_t` and related ABI assumptions.
|
|
41
|
+
|
|
42
|
+
“Assurance” here means systematically identifying and documenting potential
|
|
43
|
+
time-related risks and evidence for review. TACS contributes to that process; it
|
|
44
|
+
does not guarantee that all such risks have been found, and it cannot prove a
|
|
45
|
+
system free of rollover defects.
|
|
46
|
+
|
|
47
|
+
This repository is the open-source scanner engine and CLI. It is the code-scanning sibling of [`time_assurance_doc_scanner`](https://github.com/y2038-com/time_assurance_doc_scanner) (`tads`).
|
|
48
|
+
|
|
49
|
+
**New here?** Follow **[QUICK_START.md](QUICK_START.md)** — install through a first local scan (no LLM required).
|
|
50
|
+
|
|
51
|
+
## Status
|
|
52
|
+
|
|
53
|
+
**v0.2.0rc2** — release candidate on the CLI-first scanning pipeline. Public
|
|
54
|
+
result documents use **schema_version `1.2`** (`candidates[]`, `assessments[]`,
|
|
55
|
+
`findings[]`, plus optional `meta.llm_provider` / `meta.reasoning_effort`).
|
|
56
|
+
Schema **1.1** reports still load and render. See [CHANGELOG.md](CHANGELOG.md).
|
|
57
|
+
|
|
58
|
+
| Command | Purpose |
|
|
59
|
+
|---------|---------|
|
|
60
|
+
| `tacs scan` | Scan one local source tree |
|
|
61
|
+
| `tacs repos` | Batch-scan git repos from a JSONL list |
|
|
62
|
+
| `tacs render` | Render public scan JSON (or a batch run) to text/HTML |
|
|
63
|
+
| `tacs detect` | **Experimental** guess among the 8 ABI/`time_t` configs |
|
|
64
|
+
|
|
65
|
+
**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`.
|
|
66
|
+
|
|
67
|
+
| Provider | Typical model | Notes |
|
|
68
|
+
|----------|---------------|--------|
|
|
69
|
+
| *(none)* | — | Default; discovery-only candidates |
|
|
70
|
+
| Ollama Cloud | `gpt-oss:120b-cloud` | Recommended optional path; `OLLAMA_API_KEY`, leave `OLLAMA_HOST` unset |
|
|
71
|
+
| Ollama local | e.g. `llama3.1` | Set `OLLAMA_HOST=http://127.0.0.1:11434` |
|
|
72
|
+
| OpenAI | e.g. `gpt-4.1-mini`, opt-in `gpt-6-luna` | `OPENAI_API_KEY`; Luna: `--reasoning-effort none|low` (unset ⇒ `none`) |
|
|
73
|
+
| Anthropic / Gemini | see `.env.example` | Requires the matching API key |
|
|
74
|
+
|
|
75
|
+
BYOLLM: bring your own provider; no vendor lock-in. API keys and provider
|
|
76
|
+
settings may be supplied through process environment variables or a local
|
|
77
|
+
`.env`; process environment values take precedence.
|
|
78
|
+
|
|
79
|
+
## Privacy (read this)
|
|
80
|
+
|
|
81
|
+
There is no hosted code vault, but “local” is not the same as “nothing is retained.”
|
|
82
|
+
|
|
83
|
+
- **Source code context may be sent to the LLM provider you configure** only when you opt in (`--llm` ≠ `none`, or `TACS_LLM_PROVIDER`). That can include complete function bodies and, in later analysis stages, file-leading context plus extracted definitions (typedefs, structs, macros).
|
|
84
|
+
- **`tacs scan` reads your tree in place; `tacs repos` clones repositories and keeps them** in `--cache-dir` (default `.repo_cache`, gitignored) so later runs can reuse them. Delete that directory when you are done.
|
|
85
|
+
- Reports are written only where you ask (`--out` / batch output dirs). Prefer `--llm none` or local Ollama for sensitive trees. For local runs, keep private inputs under `inputs/` and generated artifacts under `results/` (both gitignored except their READMEs).
|
|
86
|
+
|
|
87
|
+
Details: [docs/privacy.md](docs/privacy.md).
|
|
88
|
+
|
|
89
|
+
## Principles
|
|
90
|
+
|
|
91
|
+
- Open source first; model-independent (BYOLLM)
|
|
92
|
+
- Explicit environment configuration is the supported path (8 ABI/`time_t` configs)
|
|
93
|
+
- Evidence-oriented pipeline with optional multi-stage LLM analysis
|
|
94
|
+
- Human review is authoritative — scanner outputs are **candidates for review**
|
|
95
|
+
- Language surface today is C/C++; the project name and CLI are not limited to C forever
|
|
96
|
+
|
|
97
|
+
## Limitations
|
|
98
|
+
|
|
99
|
+
TACS is an AI-assisted review aid, not an authoritative compliance oracle. Treat
|
|
100
|
+
outputs as **candidates for review**, not confirmed defects.
|
|
101
|
+
|
|
102
|
+
TACS is not a completeness checker. A clean scan does not establish that a
|
|
103
|
+
codebase is free of Y2038, Y2106, or other time-related rollover risks.
|
|
104
|
+
Detection depends on the current rules, supported language constructs,
|
|
105
|
+
environment assumptions, analysis heuristics, and—when enabled—the behavior of
|
|
106
|
+
the selected LLM.
|
|
107
|
+
|
|
108
|
+
- False positives and false negatives are expected.
|
|
109
|
+
- With `--llm none`, findings are discovery locations (often `abstain`) — not LLM-validated issues.
|
|
110
|
+
- Results vary by model, provider, rules, and `--env-config` assumptions.
|
|
111
|
+
- Wrong or missing environment config can mis-rank risk (prefer an explicit ABI/`time_t` config).
|
|
112
|
+
- `tacs detect` is experimental and often low-confidence — not ground truth.
|
|
113
|
+
- Preprocessor-agnostic scanning means guarded/dead code may still appear as candidates.
|
|
114
|
+
- 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.
|
|
115
|
+
- No findings ≠ “no time-assurance risk.”
|
|
116
|
+
- Human review remains authoritative for severity and remediation before changing production code or ABI choices.
|
|
117
|
+
|
|
118
|
+
## Environment configuration (important)
|
|
119
|
+
|
|
120
|
+
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`).
|
|
121
|
+
|
|
122
|
+
`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.
|
|
123
|
+
|
|
124
|
+
## Quick start
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
python3 -m venv .venv
|
|
128
|
+
source .venv/bin/activate # Windows: .venv\Scripts\activate
|
|
129
|
+
pip install -e ".[dev]"
|
|
130
|
+
|
|
131
|
+
tacs version
|
|
132
|
+
|
|
133
|
+
tacs scan \
|
|
134
|
+
--root tests/patterns \
|
|
135
|
+
--rules src/tacs/rules/y2038_sample_rules.json \
|
|
136
|
+
--env-config configs/example.env_config.json \
|
|
137
|
+
--llm none \
|
|
138
|
+
--out findings.json
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Then open `findings.json`. For providers, troubleshooting, and batch/render, see **[QUICK_START.md](QUICK_START.md)**.
|
|
142
|
+
|
|
143
|
+
## Layout
|
|
144
|
+
|
|
145
|
+
| Path | Purpose |
|
|
146
|
+
|------|---------|
|
|
147
|
+
| `src/tacs/` | Core engine + CLI (`scan`, `repos`, `render`) |
|
|
148
|
+
| `src/config_detector/` | Experimental build-system config detection |
|
|
149
|
+
| `src/envui/` | Environment config schema + wizard helpers |
|
|
150
|
+
| `src/report_renderer/` | Text/HTML report rendering |
|
|
151
|
+
| `configs/` | Example rules / env configs |
|
|
152
|
+
| `tests/patterns/` | Bundled example C patterns for local smoke scans |
|
|
153
|
+
| `tests/` | Unit and pattern tests |
|
|
154
|
+
| `inputs/` | Optional local run inputs (contents gitignored) |
|
|
155
|
+
| `results/` | Generated scan/batch output (`scans/`, `batches/`, each with a `latest` symlink; contents gitignored) |
|
|
156
|
+
|
|
157
|
+
## Docs
|
|
158
|
+
|
|
159
|
+
**Start here:** [QUICK_START.md](QUICK_START.md)
|
|
160
|
+
|
|
161
|
+
| Doc | Status | Purpose |
|
|
162
|
+
|-----|--------|---------|
|
|
163
|
+
| [QUICK_START.md](QUICK_START.md) | Current | Install → offline scan → optional LLM |
|
|
164
|
+
| [docs/privacy.md](docs/privacy.md) | Current | Privacy and retention defaults |
|
|
165
|
+
| [docs/env_config.md](docs/env_config.md) | Current | Environment / ABI configuration |
|
|
166
|
+
| [docs/usage/RUNNING_FULL_PIPELINE.md](docs/usage/RUNNING_FULL_PIPELINE.md) | Current | Function-first vs legacy pipeline flags |
|
|
167
|
+
| [docs/usage/CONFIG_DETECTOR_USAGE.md](docs/usage/CONFIG_DETECTOR_USAGE.md) | Current | Experimental `tacs detect` |
|
|
168
|
+
| [docs/config_detector.md](docs/config_detector.md) | Current | Detector design notes |
|
|
169
|
+
| [docs/report_renderer.md](docs/report_renderer.md) | Current | Text/HTML rendering |
|
|
170
|
+
| [docs/prd/Scanning-Workflow.md](docs/prd/Scanning-Workflow.md) | Design-era | Original TACS scanner workflow design (not CLI source of truth) |
|
|
171
|
+
| [docs/README.md](docs/README.md) | Current | Docs index |
|
|
172
|
+
| [docs/release_checklist.md](docs/release_checklist.md) | Current | Maintainer release / GitHub metadata checklist |
|
|
173
|
+
|
|
174
|
+
Sibling project: [time_assurance_doc_scanner](https://github.com/y2038-com/time_assurance_doc_scanner) (`tads`) — documentation / standards scanner.
|
|
175
|
+
|
|
176
|
+
## Contributing
|
|
177
|
+
|
|
178
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Deferred non-blocking work is tracked in [docs/backlog.md](docs/backlog.md). To report a vulnerability, use [SECURITY.md](SECURITY.md) (not a public issue).
|
|
179
|
+
|
|
180
|
+
## License
|
|
181
|
+
|
|
182
|
+
Licensed under the Apache License, Version 2.0.
|
|
183
|
+
|
|
184
|
+
Copyright (c) 2026 Y2038.com LLC
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Time Assurance Code Scanner
|
|
2
|
+
|
|
3
|
+
Open-source, AI-assisted code scanner (`tacs`) that supports long-horizon **time
|
|
4
|
+
assurance** by identifying potential Y2038 / Y2106-class risks in source code
|
|
5
|
+
around 32-bit `time_t` and related ABI assumptions.
|
|
6
|
+
|
|
7
|
+
“Assurance” here means systematically identifying and documenting potential
|
|
8
|
+
time-related risks and evidence for review. TACS contributes to that process; it
|
|
9
|
+
does not guarantee that all such risks have been found, and it cannot prove a
|
|
10
|
+
system free of rollover defects.
|
|
11
|
+
|
|
12
|
+
This repository is the open-source scanner engine and CLI. It is the code-scanning sibling of [`time_assurance_doc_scanner`](https://github.com/y2038-com/time_assurance_doc_scanner) (`tads`).
|
|
13
|
+
|
|
14
|
+
**New here?** Follow **[QUICK_START.md](QUICK_START.md)** — install through a first local scan (no LLM required).
|
|
15
|
+
|
|
16
|
+
## Status
|
|
17
|
+
|
|
18
|
+
**v0.2.0rc2** — release candidate on the CLI-first scanning pipeline. Public
|
|
19
|
+
result documents use **schema_version `1.2`** (`candidates[]`, `assessments[]`,
|
|
20
|
+
`findings[]`, plus optional `meta.llm_provider` / `meta.reasoning_effort`).
|
|
21
|
+
Schema **1.1** reports still load and render. See [CHANGELOG.md](CHANGELOG.md).
|
|
22
|
+
|
|
23
|
+
| Command | Purpose |
|
|
24
|
+
|---------|---------|
|
|
25
|
+
| `tacs scan` | Scan one local source tree |
|
|
26
|
+
| `tacs repos` | Batch-scan git repos from a JSONL list |
|
|
27
|
+
| `tacs render` | Render public scan JSON (or a batch run) to text/HTML |
|
|
28
|
+
| `tacs detect` | **Experimental** guess among the 8 ABI/`time_t` configs |
|
|
29
|
+
|
|
30
|
+
**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`.
|
|
31
|
+
|
|
32
|
+
| Provider | Typical model | Notes |
|
|
33
|
+
|----------|---------------|--------|
|
|
34
|
+
| *(none)* | — | Default; discovery-only candidates |
|
|
35
|
+
| Ollama Cloud | `gpt-oss:120b-cloud` | Recommended optional path; `OLLAMA_API_KEY`, leave `OLLAMA_HOST` unset |
|
|
36
|
+
| Ollama local | e.g. `llama3.1` | Set `OLLAMA_HOST=http://127.0.0.1:11434` |
|
|
37
|
+
| OpenAI | e.g. `gpt-4.1-mini`, opt-in `gpt-6-luna` | `OPENAI_API_KEY`; Luna: `--reasoning-effort none|low` (unset ⇒ `none`) |
|
|
38
|
+
| Anthropic / Gemini | see `.env.example` | Requires the matching API key |
|
|
39
|
+
|
|
40
|
+
BYOLLM: bring your own provider; no vendor lock-in. API keys and provider
|
|
41
|
+
settings may be supplied through process environment variables or a local
|
|
42
|
+
`.env`; process environment values take precedence.
|
|
43
|
+
|
|
44
|
+
## Privacy (read this)
|
|
45
|
+
|
|
46
|
+
There is no hosted code vault, but “local” is not the same as “nothing is retained.”
|
|
47
|
+
|
|
48
|
+
- **Source code context may be sent to the LLM provider you configure** only when you opt in (`--llm` ≠ `none`, or `TACS_LLM_PROVIDER`). That can include complete function bodies and, in later analysis stages, file-leading context plus extracted definitions (typedefs, structs, macros).
|
|
49
|
+
- **`tacs scan` reads your tree in place; `tacs repos` clones repositories and keeps them** in `--cache-dir` (default `.repo_cache`, gitignored) so later runs can reuse them. Delete that directory when you are done.
|
|
50
|
+
- Reports are written only where you ask (`--out` / batch output dirs). Prefer `--llm none` or local Ollama for sensitive trees. For local runs, keep private inputs under `inputs/` and generated artifacts under `results/` (both gitignored except their READMEs).
|
|
51
|
+
|
|
52
|
+
Details: [docs/privacy.md](docs/privacy.md).
|
|
53
|
+
|
|
54
|
+
## Principles
|
|
55
|
+
|
|
56
|
+
- Open source first; model-independent (BYOLLM)
|
|
57
|
+
- Explicit environment configuration is the supported path (8 ABI/`time_t` configs)
|
|
58
|
+
- Evidence-oriented pipeline with optional multi-stage LLM analysis
|
|
59
|
+
- Human review is authoritative — scanner outputs are **candidates for review**
|
|
60
|
+
- Language surface today is C/C++; the project name and CLI are not limited to C forever
|
|
61
|
+
|
|
62
|
+
## Limitations
|
|
63
|
+
|
|
64
|
+
TACS is an AI-assisted review aid, not an authoritative compliance oracle. Treat
|
|
65
|
+
outputs as **candidates for review**, not confirmed defects.
|
|
66
|
+
|
|
67
|
+
TACS is not a completeness checker. A clean scan does not establish that a
|
|
68
|
+
codebase is free of Y2038, Y2106, or other time-related rollover risks.
|
|
69
|
+
Detection depends on the current rules, supported language constructs,
|
|
70
|
+
environment assumptions, analysis heuristics, and—when enabled—the behavior of
|
|
71
|
+
the selected LLM.
|
|
72
|
+
|
|
73
|
+
- False positives and false negatives are expected.
|
|
74
|
+
- With `--llm none`, findings are discovery locations (often `abstain`) — not LLM-validated issues.
|
|
75
|
+
- Results vary by model, provider, rules, and `--env-config` assumptions.
|
|
76
|
+
- Wrong or missing environment config can mis-rank risk (prefer an explicit ABI/`time_t` config).
|
|
77
|
+
- `tacs detect` is experimental and often low-confidence — not ground truth.
|
|
78
|
+
- Preprocessor-agnostic scanning means guarded/dead code may still appear as candidates.
|
|
79
|
+
- 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.
|
|
80
|
+
- No findings ≠ “no time-assurance risk.”
|
|
81
|
+
- Human review remains authoritative for severity and remediation before changing production code or ABI choices.
|
|
82
|
+
|
|
83
|
+
## Environment configuration (important)
|
|
84
|
+
|
|
85
|
+
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`).
|
|
86
|
+
|
|
87
|
+
`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.
|
|
88
|
+
|
|
89
|
+
## Quick start
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
python3 -m venv .venv
|
|
93
|
+
source .venv/bin/activate # Windows: .venv\Scripts\activate
|
|
94
|
+
pip install -e ".[dev]"
|
|
95
|
+
|
|
96
|
+
tacs version
|
|
97
|
+
|
|
98
|
+
tacs scan \
|
|
99
|
+
--root tests/patterns \
|
|
100
|
+
--rules src/tacs/rules/y2038_sample_rules.json \
|
|
101
|
+
--env-config configs/example.env_config.json \
|
|
102
|
+
--llm none \
|
|
103
|
+
--out findings.json
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Then open `findings.json`. For providers, troubleshooting, and batch/render, see **[QUICK_START.md](QUICK_START.md)**.
|
|
107
|
+
|
|
108
|
+
## Layout
|
|
109
|
+
|
|
110
|
+
| Path | Purpose |
|
|
111
|
+
|------|---------|
|
|
112
|
+
| `src/tacs/` | Core engine + CLI (`scan`, `repos`, `render`) |
|
|
113
|
+
| `src/config_detector/` | Experimental build-system config detection |
|
|
114
|
+
| `src/envui/` | Environment config schema + wizard helpers |
|
|
115
|
+
| `src/report_renderer/` | Text/HTML report rendering |
|
|
116
|
+
| `configs/` | Example rules / env configs |
|
|
117
|
+
| `tests/patterns/` | Bundled example C patterns for local smoke scans |
|
|
118
|
+
| `tests/` | Unit and pattern tests |
|
|
119
|
+
| `inputs/` | Optional local run inputs (contents gitignored) |
|
|
120
|
+
| `results/` | Generated scan/batch output (`scans/`, `batches/`, each with a `latest` symlink; contents gitignored) |
|
|
121
|
+
|
|
122
|
+
## Docs
|
|
123
|
+
|
|
124
|
+
**Start here:** [QUICK_START.md](QUICK_START.md)
|
|
125
|
+
|
|
126
|
+
| Doc | Status | Purpose |
|
|
127
|
+
|-----|--------|---------|
|
|
128
|
+
| [QUICK_START.md](QUICK_START.md) | Current | Install → offline scan → optional LLM |
|
|
129
|
+
| [docs/privacy.md](docs/privacy.md) | Current | Privacy and retention defaults |
|
|
130
|
+
| [docs/env_config.md](docs/env_config.md) | Current | Environment / ABI configuration |
|
|
131
|
+
| [docs/usage/RUNNING_FULL_PIPELINE.md](docs/usage/RUNNING_FULL_PIPELINE.md) | Current | Function-first vs legacy pipeline flags |
|
|
132
|
+
| [docs/usage/CONFIG_DETECTOR_USAGE.md](docs/usage/CONFIG_DETECTOR_USAGE.md) | Current | Experimental `tacs detect` |
|
|
133
|
+
| [docs/config_detector.md](docs/config_detector.md) | Current | Detector design notes |
|
|
134
|
+
| [docs/report_renderer.md](docs/report_renderer.md) | Current | Text/HTML rendering |
|
|
135
|
+
| [docs/prd/Scanning-Workflow.md](docs/prd/Scanning-Workflow.md) | Design-era | Original TACS scanner workflow design (not CLI source of truth) |
|
|
136
|
+
| [docs/README.md](docs/README.md) | Current | Docs index |
|
|
137
|
+
| [docs/release_checklist.md](docs/release_checklist.md) | Current | Maintainer release / GitHub metadata checklist |
|
|
138
|
+
|
|
139
|
+
Sibling project: [time_assurance_doc_scanner](https://github.com/y2038-com/time_assurance_doc_scanner) (`tads`) — documentation / standards scanner.
|
|
140
|
+
|
|
141
|
+
## Contributing
|
|
142
|
+
|
|
143
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Deferred non-blocking work is tracked in [docs/backlog.md](docs/backlog.md). To report a vulnerability, use [SECURITY.md](SECURITY.md) (not a public issue).
|
|
144
|
+
|
|
145
|
+
## License
|
|
146
|
+
|
|
147
|
+
Licensed under the Apache License, Version 2.0.
|
|
148
|
+
|
|
149
|
+
Copyright (c) 2026 Y2038.com LLC
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "time-assurance-code-scanner"
|
|
7
|
+
version = "0.2.0rc2"
|
|
8
|
+
description = "AI-assisted scanner that supports long-horizon time assurance by identifying potential Y2038/Y2106-class risks in source code."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
|
+
authors = [{ name = "Y2038.com LLC" }]
|
|
12
|
+
license = "Apache-2.0"
|
|
13
|
+
keywords = [
|
|
14
|
+
"y2038",
|
|
15
|
+
"y2106",
|
|
16
|
+
"time_t",
|
|
17
|
+
"static-analysis",
|
|
18
|
+
"security",
|
|
19
|
+
"c",
|
|
20
|
+
"cpp",
|
|
21
|
+
"time-assurance",
|
|
22
|
+
]
|
|
23
|
+
classifiers = [
|
|
24
|
+
"Development Status :: 3 - Alpha",
|
|
25
|
+
"Environment :: Console",
|
|
26
|
+
"Intended Audience :: Developers",
|
|
27
|
+
"Operating System :: OS Independent",
|
|
28
|
+
"Programming Language :: Python :: 3",
|
|
29
|
+
"Programming Language :: Python :: 3.12",
|
|
30
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
31
|
+
"Topic :: Security",
|
|
32
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
33
|
+
]
|
|
34
|
+
dependencies = [
|
|
35
|
+
"pydantic>=2.0.0",
|
|
36
|
+
"click>=8.0.0",
|
|
37
|
+
"requests>=2.25.0",
|
|
38
|
+
"jsonschema>=4.0.0",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.optional-dependencies]
|
|
42
|
+
full = ["tree-sitter>=0.20.0"]
|
|
43
|
+
dev = ["pytest>=7.0.0", "black>=22.0.0", "ruff>=0.1.0"]
|
|
44
|
+
|
|
45
|
+
[project.scripts]
|
|
46
|
+
tacs = "tacs.cli:app"
|
|
47
|
+
|
|
48
|
+
[project.urls]
|
|
49
|
+
Homepage = "https://github.com/y2038-com/time_assurance_code_scanner"
|
|
50
|
+
Repository = "https://github.com/y2038-com/time_assurance_code_scanner"
|
|
51
|
+
Issues = "https://github.com/y2038-com/time_assurance_code_scanner/issues"
|
|
52
|
+
Documentation = "https://github.com/y2038-com/time_assurance_code_scanner#readme"
|
|
53
|
+
|
|
54
|
+
[tool.setuptools.packages.find]
|
|
55
|
+
where = ["src"]
|
|
56
|
+
exclude = ["*.tests", "*.tests.*"]
|
|
57
|
+
|
|
58
|
+
[tool.setuptools.package-data]
|
|
59
|
+
tacs = ["rules/*.json", "python/*.py", "fixtures/**/*"]
|
|
60
|
+
envui = ["schemas/*.json", "examples/*.json"]
|
|
61
|
+
report_renderer = ["fixtures/*.json"]
|
|
62
|
+
|
|
63
|
+
[tool.pytest.ini_options]
|
|
64
|
+
testpaths = ["tests", "src/report_renderer/tests"]
|
|
65
|
+
pythonpath = ["src"]
|
|
66
|
+
python_files = ["test_*.py"]
|
|
67
|
+
norecursedirs = [".git", ".venv", "venv", "results", "batch_runs", "manual", "historical"]
|
|
68
|
+
filterwarnings = [
|
|
69
|
+
"ignore::DeprecationWarning:tacs.core.scan_session",
|
|
70
|
+
"ignore::DeprecationWarning:tacs.core.pipeline",
|
|
71
|
+
"ignore::pydantic.warnings.PydanticDeprecatedSince20",
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
[tool.black]
|
|
75
|
+
line-length = 88
|
|
76
|
+
target-version = ["py312"]
|
|
77
|
+
|
|
78
|
+
[tool.ruff]
|
|
79
|
+
line-length = 88
|
|
80
|
+
target-version = "py312"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Copyright (c) 2026 Y2038.com LLC
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
Auto-Detection Configuration Utility
|
|
6
|
+
|
|
7
|
+
A separate Python utility that analyzes build systems and outputs likelihood scores
|
|
8
|
+
for all eight possible environment configurations.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
__version__ = "1.0.0"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (c) 2026 Y2038.com LLC
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
"""Analyzers for detecting architecture, time_t configuration, and C library."""
|
|
5
|
+
|
|
6
|
+
from .architecture import ArchitectureDetector
|
|
7
|
+
from .time_t_config import TimeTConfigDetector
|
|
8
|
+
|
|
9
|
+
__all__ = ['ArchitectureDetector', 'TimeTConfigDetector']
|