timeglyph 0.3.0__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.
Files changed (100) hide show
  1. timeglyph-0.3.0/.gitignore +24 -0
  2. timeglyph-0.3.0/.gitleaks.toml +13 -0
  3. timeglyph-0.3.0/.pre-commit-config.yaml +21 -0
  4. timeglyph-0.3.0/CHANGELOG.md +67 -0
  5. timeglyph-0.3.0/CITATION.cff +27 -0
  6. timeglyph-0.3.0/Cargo.lock +1119 -0
  7. timeglyph-0.3.0/Cargo.toml +138 -0
  8. timeglyph-0.3.0/LICENSE +188 -0
  9. timeglyph-0.3.0/NOTICE +36 -0
  10. timeglyph-0.3.0/PKG-INFO +9 -0
  11. timeglyph-0.3.0/README.md +160 -0
  12. timeglyph-0.3.0/SECURITY.md +42 -0
  13. timeglyph-0.3.0/assets/lens-in-action.png +0 -0
  14. timeglyph-0.3.0/assets/lens.png +0 -0
  15. timeglyph-0.3.0/assets/logo.png +0 -0
  16. timeglyph-0.3.0/assets/logo.svg +1 -0
  17. timeglyph-0.3.0/bindings/python/.gitignore +6 -0
  18. timeglyph-0.3.0/bindings/python/Cargo.lock +417 -0
  19. timeglyph-0.3.0/bindings/python/Cargo.toml +23 -0
  20. timeglyph-0.3.0/bindings/python/src/lib.rs +32 -0
  21. timeglyph-0.3.0/bindings/python/tests/test_timeglyph.py +22 -0
  22. timeglyph-0.3.0/clippy.toml +5 -0
  23. timeglyph-0.3.0/data/README.md +57 -0
  24. timeglyph-0.3.0/data/generate_holidays.py +51 -0
  25. timeglyph-0.3.0/data/generate_zone_country.py +49 -0
  26. timeglyph-0.3.0/data/holidays.json.gz +0 -0
  27. timeglyph-0.3.0/data/zone_country.json +1 -0
  28. timeglyph-0.3.0/deny.toml +54 -0
  29. timeglyph-0.3.0/integrations/README.md +25 -0
  30. timeglyph-0.3.0/integrations/kape/timeglyph.mkape +12 -0
  31. timeglyph-0.3.0/integrations/timesketch/test_timeglyph_analyzer.py +67 -0
  32. timeglyph-0.3.0/integrations/timesketch/timeglyph_analyzer.py +52 -0
  33. timeglyph-0.3.0/integrations/velociraptor/Custom.Timeglyph.Identify.yaml +26 -0
  34. timeglyph-0.3.0/packaging/winget/README.md +64 -0
  35. timeglyph-0.3.0/packaging/winget/manifests/s/SecurityRonin/timeglyph/0.2.0/SecurityRonin.timeglyph.installer.yaml +18 -0
  36. timeglyph-0.3.0/packaging/winget/manifests/s/SecurityRonin/timeglyph/0.2.0/SecurityRonin.timeglyph.locale.en-US.yaml +27 -0
  37. timeglyph-0.3.0/packaging/winget/manifests/s/SecurityRonin/timeglyph/0.2.0/SecurityRonin.timeglyph.yaml +6 -0
  38. timeglyph-0.3.0/pyproject.toml +19 -0
  39. timeglyph-0.3.0/renovate.json +33 -0
  40. timeglyph-0.3.0/rust-toolchain.toml +2 -0
  41. timeglyph-0.3.0/rustfmt.toml +1 -0
  42. timeglyph-0.3.0/scripts/build-playground.sh +10 -0
  43. timeglyph-0.3.0/scripts/coverage-gate.py +95 -0
  44. timeglyph-0.3.0/src/compose.rs +57 -0
  45. timeglyph-0.3.0/src/csv_enrich.rs +201 -0
  46. timeglyph-0.3.0/src/datefmt.rs +89 -0
  47. timeglyph-0.3.0/src/holiday.rs +171 -0
  48. timeglyph-0.3.0/src/interpret.rs +1518 -0
  49. timeglyph-0.3.0/src/leap.rs +146 -0
  50. timeglyph-0.3.0/src/lib.rs +562 -0
  51. timeglyph-0.3.0/src/lunisolar.rs +268 -0
  52. timeglyph-0.3.0/src/main.rs +1050 -0
  53. timeglyph-0.3.0/src/registry.rs +1355 -0
  54. timeglyph-0.3.0/src/scan.rs +501 -0
  55. timeglyph-0.3.0/tests/anchors.rs +218 -0
  56. timeglyph-0.3.0/tests/api.rs +76 -0
  57. timeglyph-0.3.0/tests/calibration.rs +139 -0
  58. timeglyph-0.3.0/tests/catalog.rs +186 -0
  59. timeglyph-0.3.0/tests/cli.rs +536 -0
  60. timeglyph-0.3.0/tests/compose.rs +80 -0
  61. timeglyph-0.3.0/tests/confidence.rs +31 -0
  62. timeglyph-0.3.0/tests/context_scoring.rs +139 -0
  63. timeglyph-0.3.0/tests/coverage_edges.rs +173 -0
  64. timeglyph-0.3.0/tests/csv_enrich.rs +91 -0
  65. timeglyph-0.3.0/tests/cursor.rs +37 -0
  66. timeglyph-0.3.0/tests/data/.gitignore +3 -0
  67. timeglyph-0.3.0/tests/data/README.md +131 -0
  68. timeglyph-0.3.0/tests/data/calibration.csv +337 -0
  69. timeglyph-0.3.0/tests/data/josh-hickman-android10/msgstore.db +0 -0
  70. timeglyph-0.3.0/tests/data/josh-hickman-ios13/ChatStorage.sqlite +0 -0
  71. timeglyph-0.3.0/tests/data/reconciliation.csv +7 -0
  72. timeglyph-0.3.0/tests/datefmt.rs +134 -0
  73. timeglyph-0.3.0/tests/docs_sync.rs +64 -0
  74. timeglyph-0.3.0/tests/encode_packed_g1.rs +216 -0
  75. timeglyph-0.3.0/tests/encode_packed_g3.rs +223 -0
  76. timeglyph-0.3.0/tests/encoding.rs +245 -0
  77. timeglyph-0.3.0/tests/epistemics.rs +56 -0
  78. timeglyph-0.3.0/tests/extra.rs +85 -0
  79. timeglyph-0.3.0/tests/floats.rs +95 -0
  80. timeglyph-0.3.0/tests/holiday.rs +102 -0
  81. timeglyph-0.3.0/tests/json.rs +36 -0
  82. timeglyph-0.3.0/tests/leap.rs +77 -0
  83. timeglyph-0.3.0/tests/limits.rs +36 -0
  84. timeglyph-0.3.0/tests/lunisolar.rs +204 -0
  85. timeglyph-0.3.0/tests/oracle.rs +532 -0
  86. timeglyph-0.3.0/tests/oracle_crates.rs +253 -0
  87. timeglyph-0.3.0/tests/oracle_extra.rs +113 -0
  88. timeglyph-0.3.0/tests/packed.rs +134 -0
  89. timeglyph-0.3.0/tests/provenance.rs +14 -0
  90. timeglyph-0.3.0/tests/reconciliation.rs +55 -0
  91. timeglyph-0.3.0/tests/robustness.rs +57 -0
  92. timeglyph-0.3.0/tests/rollover.rs +79 -0
  93. timeglyph-0.3.0/tests/scan.rs +387 -0
  94. timeglyph-0.3.0/tests/scoring.rs +282 -0
  95. timeglyph-0.3.0/tests/sentinels.rs +67 -0
  96. timeglyph-0.3.0/tests/strings.rs +96 -0
  97. timeglyph-0.3.0/tests/timestomp.rs +96 -0
  98. timeglyph-0.3.0/tests/timezone.rs +65 -0
  99. timeglyph-0.3.0/tests/unfurl_oracle.rs +65 -0
  100. timeglyph-0.3.0/tests/weekday.rs +18 -0
@@ -0,0 +1,24 @@
1
+ /target
2
+
3
+ # mkdocs build output (docs/ is the source; the built site is ephemeral)
4
+ /site
5
+
6
+ # cargo-fuzz build/run artifacts (the targets themselves are committed)
7
+ /fuzz/target
8
+ /fuzz/corpus
9
+ /fuzz/artifacts
10
+ /fuzz/Cargo.lock
11
+
12
+ # timeglyph is a binary/app: Cargo.lock IS committed (reproducible shipped graph
13
+ # + CI `cargo update --locked` freshness gate). It is deliberately NOT ignored.
14
+
15
+ # Coverage artifacts
16
+ cov.json
17
+ lcov.info
18
+
19
+ # Claude Code session state (worktrees, memory, plans) — ephemeral, never tracked
20
+ /.claude/
21
+
22
+ # Playground WASM built into docs/ at deploy time (source is wasm/)
23
+ /docs/timeglyph_wasm.js
24
+ /docs/timeglyph_wasm_bg.wasm
@@ -0,0 +1,13 @@
1
+ # gitleaks configuration for timeglyph. Extends the bundled default ruleset;
2
+ # allowlists generated / build-output trees (all gitignored, never source) so a
3
+ # full `gitleaks dir .` stays clean and fast. The pre-commit hook scans only
4
+ # staged files regardless.
5
+ [extend]
6
+ useDefault = true
7
+
8
+ [allowlist]
9
+ description = "Project-specific allowlist"
10
+ paths = [
11
+ '''(^|/)target/''',
12
+ '''(^|/)site/''',
13
+ ]
@@ -0,0 +1,21 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ - id: check-toml
9
+ - id: check-merge-conflict
10
+
11
+ - repo: https://github.com/doublify/pre-commit-rust
12
+ rev: v1.0
13
+ hooks:
14
+ - id: fmt
15
+ - id: clippy
16
+ args: ["--all-targets", "--all-features", "--", "-D", "warnings"]
17
+
18
+ - repo: https://github.com/gitleaks/gitleaks
19
+ rev: v8.21.2
20
+ hooks:
21
+ - id: gitleaks
@@ -0,0 +1,67 @@
1
+ # Changelog
2
+
3
+ All notable changes to `timeglyph` are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project aims to
5
+ follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.3.0] - 2026-06-29
10
+
11
+ ### Added
12
+
13
+ - **Selectable output timezone** (`--tz`): render dates in `UTC` (default, `Z`),
14
+ a fixed offset (`+08:00`), or an IANA zone (`America/New_York`, DST-correct per
15
+ instant). Threaded through identify/decode/hex/string/csv and `--json`; the
16
+ instant is unchanged, only the displayed offset. An unknown zone errors loudly.
17
+ - **Lunisolar calendar + 干支 four pillars** (`lunisolar` feature, CLI
18
+ `lunisolar <datetime> --tz <zone> [--longitude <°E>]`): the Chinese lunar date
19
+ (incl. leap months) plus the sexagenary year/month/day/hour pillars, the Sun's
20
+ apparent ecliptic longitude, and the current solar term. The year (立春) and
21
+ month (the 12 節) pillars are driven by the `stem-branch` solar ephemeris; the
22
+ lunar (moon) date by `lunar-lite`; the day pillar by Julian-day arithmetic and
23
+ the hour pillar by 五鼠遁. The conversion is convention-relative, so a meridian
24
+ (`--tz`) is **required** and an optional longitude corrects the hour pillar to
25
+ local mean solar time; conventions (立春 year, 節 month, 正月初一 lunar date) are
26
+ surfaced as assumptions. Validated against the independent `cnlunar` oracle.
27
+ - **Context-aware scoring components** (ADR 0005): `byte_width_match`,
28
+ `endian_match`, `artifact_match`, `neighbour_monotonicity`, each emitted only
29
+ when an `InterpretContext` supplies its input (hex width/endian, `--artifact`
30
+ hint, CSV column neighbours); the zero-context default is unchanged.
31
+ - **Format catalog**: PostgreSQL (µs since 2000), Unix nanoseconds, Cocoa
32
+ `CFAbsoluteTime` as a signed double, SQLite Julian-day float, Snowflake IDs
33
+ (Twitter/X and Discord), plus AD/LDAP, Mozilla PRTime, iOS-11 NSDate (ns),
34
+ KSUID, Excel-1904, Mastodon/LinkedIn/TikTok IDs, ULID, UUIDv1, RFC 2822, EXIF,
35
+ and 128-bit SYSTEMTIME — each cross-checked against the MIT `time-decode`
36
+ oracle.
37
+ - **Generalised embedded-ID strategy** (`Embedded { epoch_ns, shift_bits, unit }`,
38
+ was `EmbeddedMillis`): supports seconds-shift IDs (TikTok) as well as the
39
+ millisecond snowflake family.
40
+ - **`Packed` strategy + FAT/DOS format**: unpacks the 32-bit FAT/DOS date+time
41
+ words as LOCAL naive time, with a no-offset/naive caveat surfaced on the
42
+ reading (FAT's local-time semantics are forensically significant).
43
+ - **Leap-aware module** (`src/leap.rs`, behind the `leap` feature): GPS and TAI64
44
+ via `hifitime`'s leap-second table, NTP (RFC 5905) via additive `jiff`; kept
45
+ out of the POSIX spine. CLI `--from gps|tai64|ntp`.
46
+ - **Component-based plausibility scoring** (`representable`, `in_window`,
47
+ `granularity_match`, `magnitude_fit`) emitted on every candidate so the rank is
48
+ auditable. `granularity_match` resolves the seconds-vs-ms-vs-µs-vs-ns ambiguity
49
+ via trailing-zero analysis; `magnitude_fit` sinks epoch-hugging false ID reads.
50
+ - **Epistemic framing**: candidates are described as *consistent with* a format
51
+ (never "detected"), and POSIX readings carry a leap-smear disclaimer.
52
+ - **Real `--json`** output via `serde::Serialize` on `Candidate`/`PosixNs`.
53
+ - **Fleet standards**: Apache-2.0 `LICENSE`, `SECURITY.md`, `deny.toml`,
54
+ `clippy.toml`, `cargo-fuzz` targets (no-panic invariant), MkDocs site with
55
+ Privacy/Terms, and GitHub Actions CI (test/clippy/fmt/coverage/deny/freshness),
56
+ Docs, and a tag-driven Release workflow.
57
+
58
+ ### Changed
59
+
60
+ - `EmbeddedMillis` strategy renamed/generalised to `Embedded { …, unit }`.
61
+
62
+ ### Notes
63
+
64
+ - Remaining build-out: the obscure packed-bitfield formats
65
+ (exFAT offset byte, bitdate/dttm/logtime/ns40/moto/symantec/dvr, BCD/GSM
66
+ semi-octet, Sonyflake's 10ms unit) and the distribution fan-out
67
+ (Homebrew/apt/winget).
@@ -0,0 +1,27 @@
1
+ cff-version: 1.2.0
2
+ title: timeglyph
3
+ message: >-
4
+ If you use timeglyph in forensic examination or research, please cite it.
5
+ For a reading traceable to a specific engine build, run with `--provenance`
6
+ and record the reported `engine_version` and `registry_digest`.
7
+ type: software
8
+ authors:
9
+ - family-names: Hui
10
+ given-names: Albert
11
+ email: albert@securityronin.com
12
+ affiliation: Security Ronin
13
+ repository-code: "https://github.com/SecurityRonin/timeglyph"
14
+ url: "https://securityronin.github.io/timeglyph/"
15
+ abstract: >-
16
+ A forensic timestamp decipherment engine: decode, encode, and identify the
17
+ many ways systems inscribe time, with scored, cited, ambiguity-first
18
+ interpretation — every plausible reading ranked, with stated assumptions and a
19
+ spec citation, rather than a single guessed answer.
20
+ keywords:
21
+ - digital-forensics
22
+ - DFIR
23
+ - timestamp
24
+ - epoch
25
+ - datetime
26
+ license: Apache-2.0
27
+ version: 0.3.0