attribution-suite 0.6.0__py3-none-any.whl

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.
@@ -0,0 +1,19 @@
1
+ """attribution-suite: one install and one CLI over the three attribution packages.
2
+
3
+ The packages are separate on purpose. ``attribution-graph`` is a pure inference
4
+ library with no network I/O, which is what makes its scoring auditable;
5
+ ``adtx-attribution`` carries the collectors and their dependencies;
6
+ ``handle-correlation`` is independent of both. Someone who only wants the scoring
7
+ model should not have to install an HTTP client, and someone building their own
8
+ collectors should not inherit ours.
9
+
10
+ This package exists for the case where you want all of it: ``pip install
11
+ attribution-suite`` and a single ``attribution`` command that runs the whole
12
+ chain — collect, score, resolve, verify, report — with one case file.
13
+ """
14
+
15
+ from .runner import SuiteResult, run_case
16
+ from .version import PACKAGES, versions
17
+
18
+ __version__ = "0.6.0"
19
+ __all__ = ["run_case", "SuiteResult", "versions", "PACKAGES", "__version__"]
@@ -0,0 +1,131 @@
1
+ """Unified CLI.
2
+
3
+ attribution run --case case.yaml [--index adtx.sqlite] [--handles h.csv]
4
+ attribution portfolio <domain> --index adtx.sqlite
5
+ attribution handles --observations h.csv
6
+ attribution registries --jurisdiction IN
7
+ attribution verify ./out/evidence
8
+ attribution version
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ import argparse
14
+ import contextlib
15
+ import os
16
+ import subprocess
17
+ import sys
18
+ from pathlib import Path
19
+
20
+ from .runner import run_case
21
+ from .version import banner, versions
22
+
23
+
24
+ def _run(a: argparse.Namespace) -> int:
25
+ from attribution_graph import PolicyError
26
+ try:
27
+ res = run_case(
28
+ a.case, a.out, corpus_index=a.index or None, blacklist=a.blacklist or None,
29
+ handles=a.handles or None, spiderfoot=a.spiderfoot or None,
30
+ opencti=a.opencti or None, robin=a.robin or None,
31
+ show_scores=not a.no_scores,
32
+ evidence=not a.no_evidence, concurrency=a.concurrency,
33
+ )
34
+ except PolicyError as e:
35
+ print(f"policy error: {e}", file=sys.stderr)
36
+ return 2
37
+
38
+ print(banner())
39
+ print(res.summary())
40
+ print()
41
+ for p in res.outputs:
42
+ print(f" {p}")
43
+ # Non-zero when integrity failed: a caller scripting this must be able to
44
+ # detect that the findings are not presentable.
45
+ return 1 if res.stats.get("evidence_verified") is False else 0
46
+
47
+
48
+ def _verify(a: argparse.Namespace) -> int:
49
+ v = Path(a.path) / "verify.py"
50
+ if not v.exists():
51
+ v = Path(a.path)
52
+ if not v.exists():
53
+ print(f"no verify.py at {a.path}", file=sys.stderr)
54
+ return 2
55
+ return subprocess.call([sys.executable, str(v)])
56
+
57
+
58
+ def _delegate(module: str, argv: list[str]) -> int:
59
+ from importlib import import_module
60
+ return import_module(module).main(argv)
61
+
62
+
63
+ def _version(_: argparse.Namespace) -> int:
64
+ for k, v in versions().items():
65
+ print(f"{k.replace('_', '-'):22} {v}")
66
+ return 0
67
+
68
+
69
+ def main(argv: list[str] | None = None) -> int:
70
+ ap = argparse.ArgumentParser(
71
+ prog="attribution",
72
+ description="Unified entity attribution suite")
73
+ sub = ap.add_subparsers(dest="cmd", required=True)
74
+
75
+ r = sub.add_parser("run", help="full chain from one case file")
76
+ r.add_argument("--case", required=True)
77
+ r.add_argument("--out", default="./out")
78
+ r.add_argument("--index", default="", help="ads.txt corpus sqlite")
79
+ r.add_argument("--blacklist", default="")
80
+ r.add_argument("--handles", default="", help="observed-handle CSV/JSON")
81
+ r.add_argument("--spiderfoot", default="", help="SpiderFoot .csv or .db")
82
+ r.add_argument("--opencti", default="", help="STIX 2.1 bundle")
83
+ r.add_argument("--robin", default="", help="Robin dark web investigation JSON")
84
+ r.add_argument("--no-scores", action="store_true",
85
+ help="omit confidence figures from the report")
86
+ r.add_argument("--no-evidence", action="store_true")
87
+ r.add_argument("--concurrency", type=int, default=6)
88
+ r.set_defaults(func=_run)
89
+
90
+ v = sub.add_parser("verify", help="check an evidence package's integrity")
91
+ v.add_argument("path", default="./out/evidence", nargs="?")
92
+ v.set_defaults(func=_verify)
93
+
94
+ sub.add_parser("version").set_defaults(func=_version)
95
+
96
+ known = {"run", "verify", "version"}
97
+ argv = list(sys.argv[1:] if argv is None else argv)
98
+
99
+ # Pass through to the component CLIs rather than duplicating their flags.
100
+ if argv and argv[0] not in known:
101
+ delegates = {
102
+ "portfolio": ("adtx_attribution.cli", argv),
103
+ "registries": ("adtx_attribution.cli", argv),
104
+ "index": ("adtx_attribution.index", argv[1:]),
105
+ "handles": ("handle_correlation.cli", ["score"] + argv[1:]),
106
+ }
107
+ if argv[0] in delegates:
108
+ mod, passthru = delegates[argv[0]]
109
+ if argv[0] == "index":
110
+ from adtx_attribution.index import _main
111
+ return _main(passthru)
112
+ return _delegate(mod, passthru)
113
+
114
+ args = ap.parse_args(argv)
115
+ return args.func(args)
116
+
117
+
118
+ def _cli() -> int:
119
+ try:
120
+ return main()
121
+ except BrokenPipeError:
122
+ os.dup2(os.open(os.devnull, os.O_WRONLY), sys.stdout.fileno())
123
+ return 0
124
+ except KeyboardInterrupt:
125
+ with contextlib.suppress(Exception):
126
+ print("\ninterrupted", file=sys.stderr)
127
+ return 130
128
+
129
+
130
+ if __name__ == "__main__":
131
+ raise SystemExit(_cli())
@@ -0,0 +1,205 @@
1
+ """Unified run: collect, score, resolve, verify, report.
2
+
3
+ One case file drives everything. The sequence is fixed because the ordering
4
+ matters: adversarial checks must run before scoring (a planted identifier must
5
+ not reach the model at full weight), and evidence verification must run before
6
+ reporting (findings from a package that failed its integrity check should never
7
+ be presented).
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ import asyncio
13
+ from dataclasses import dataclass, field
14
+ from pathlib import Path
15
+ from typing import Any
16
+
17
+ from attribution_graph import (
18
+ AttributionGraph,
19
+ CaseScope,
20
+ CompositeIndex,
21
+ Engine,
22
+ EvidenceLog,
23
+ InMemoryIndex,
24
+ PolicyEngine,
25
+ ResolutionResult,
26
+ RobotsPolicy,
27
+ StepKind,
28
+ Trail,
29
+ load_blacklist,
30
+ write_all,
31
+ write_evidence_package,
32
+ )
33
+
34
+
35
+ @dataclass
36
+ class SuiteResult:
37
+ scope: CaseScope
38
+ graph: AttributionGraph
39
+ resolution: ResolutionResult | None
40
+ trail: Trail
41
+ evidence: EvidenceLog | None
42
+ outputs: list[Path] = field(default_factory=list)
43
+ warnings: list[str] = field(default_factory=list)
44
+ stats: dict[str, Any] = field(default_factory=dict)
45
+
46
+ def summary(self) -> str:
47
+ L = [f"case {self.scope.case_ref}",
48
+ f" {len(self.graph.identifiers)} identifiers, "
49
+ f"{len(self.graph.claims)} claims, {len(self.graph.entities)} entities"]
50
+ for k, v in self.stats.items():
51
+ L.append(f" {k}: {v}")
52
+ if self.warnings:
53
+ L.append(" warnings:")
54
+ L += [f" - {w}" for w in self.warnings]
55
+ return "\n".join(L)
56
+
57
+
58
+ def run_case(
59
+ case_path: str | Path,
60
+ outdir: str | Path = "./out",
61
+ *,
62
+ corpus_index: str | Path | None = None,
63
+ blacklist: str | Path | None = None,
64
+ handles: str | Path | None = None,
65
+ spiderfoot: str | Path | None = None,
66
+ opencti: str | Path | None = None,
67
+ robin: str | Path | None = None,
68
+ show_scores: bool = True,
69
+ evidence: bool = True,
70
+ concurrency: int = 6,
71
+ ) -> SuiteResult:
72
+ """Run the full chain from one case file."""
73
+ from adtx_attribution import AdsTxtIndex, Fetcher
74
+ from adtx_attribution.collectors import build_all
75
+
76
+ scope = CaseScope.load(case_path)
77
+ out = Path(outdir)
78
+ out.mkdir(parents=True, exist_ok=True)
79
+
80
+ trail = Trail(scope.case_ref, scope.authorization)
81
+ warnings: list[str] = []
82
+ stats: dict[str, Any] = {}
83
+
84
+ if blacklist:
85
+ load_blacklist(str(blacklist))
86
+
87
+ ua = (f"attribution-suite/0.2 (case {scope.case_ref}; "
88
+ f"{scope.contact_email or 'no-contact-configured'})")
89
+ fetcher = Fetcher(user_agent=ua, max_requests=scope.max_requests)
90
+ policy = PolicyEngine(policy=RobotsPolicy(scope.robots_policy), user_agent=ua)
91
+ ev = EvidenceLog(scope, out / "evidence") if evidence else None
92
+
93
+ collectors = build_all(fetcher, scope)
94
+ engine = Engine(scope, collectors=collectors, concurrency=concurrency)
95
+
96
+ if corpus_index:
97
+ engine.index = CompositeIndex(AdsTxtIndex(str(corpus_index)),
98
+ InMemoryIndex(engine.graph))
99
+ else:
100
+ warnings.append(
101
+ "no corpus index supplied — selectivity counts come from this case "
102
+ "only, so confidence figures are upper bounds, not assessments")
103
+
104
+ for s in scope.seeds:
105
+ trail.seed(s)
106
+
107
+ # --- imported claims, before collection, so they seed the frontier ------ #
108
+ if spiderfoot:
109
+ from adtx_attribution import from_spiderfoot_csv, from_spiderfoot_db
110
+ p = Path(spiderfoot)
111
+ imported = (from_spiderfoot_db(p) if p.suffix in (".db", ".sqlite")
112
+ else from_spiderfoot_csv(p))
113
+ for c in imported:
114
+ engine.ingest(c, depth=1)
115
+ stats["spiderfoot_claims"] = len(imported)
116
+ trail.add_imported("SpiderFoot", str(p), len(imported))
117
+
118
+ if opencti:
119
+ from adtx_attribution import from_opencti_bundle
120
+ imported = from_opencti_bundle(Path(opencti))
121
+ for c in imported:
122
+ engine.ingest(c, depth=1)
123
+ stats["opencti_claims"] = len(imported)
124
+ trail.add_imported("OpenCTI", str(opencti), len(imported))
125
+
126
+ robin_claims: list = []
127
+ if robin:
128
+ from adtx_attribution import from_robin
129
+ robin_claims = from_robin(Path(robin))
130
+ for c in robin_claims:
131
+ engine.ingest(c, depth=1)
132
+ stats["robin_claims"] = len(robin_claims)
133
+ onion = sum(1 for c in robin_claims if c.raw.get("onion"))
134
+ llm = sum(1 for c in robin_claims if c.raw.get("llm_derived"))
135
+ stats["robin_onion_sources"] = onion
136
+ trail.add_imported("Robin", str(robin), len(robin_claims))
137
+ trail.add(
138
+ StepKind.FILTER,
139
+ f"Marked {len(robin_claims)} Robin claim(s) as derived text",
140
+ detail=("Robin truncates scraped content and does not retain response "
141
+ "bodies, so these are leads rather than captures. "
142
+ f"{onion} came from .onion sources, which cannot be re-fetched "
143
+ f"or archived; {llm} were asserted by a language model and are "
144
+ "capped at UNCERTAIN."))
145
+ if onion:
146
+ warnings.append(
147
+ f"{onion} claim(s) derive from .onion sources with no preserved "
148
+ "response body — unverifiable after the fact by anyone, including you")
149
+
150
+ # --- collect ------------------------------------------------------------ #
151
+ resolution = asyncio.run(engine.run())
152
+ asyncio.run(fetcher.aclose())
153
+ stats["requests"] = fetcher.count
154
+
155
+ # --- handles ------------------------------------------------------------ #
156
+ if handles or robin_claims:
157
+ from handle_correlation import HandleCorpus, Observation, all_claims, correlation_points
158
+ from handle_correlation import load as load_handles
159
+
160
+ obs = load_handles(handles) if handles else []
161
+
162
+ # Handles Robin surfaced join the same correlation pass, carrying the
163
+ # durable identifiers found on the same page -- which is what can lift
164
+ # them above the correlation-point floor.
165
+ if robin_claims:
166
+ from adtx_attribution import to_handle_observations
167
+ for row in to_handle_observations(robin_claims, scope.case_ref):
168
+ obs.append(Observation(
169
+ handle=row["handle"], platform=row["platform"],
170
+ linked={k[5:]: v for k, v in row.items() if k.startswith("link_")},
171
+ source_url=row.get("source_url", ""),
172
+ case_ref=row.get("case_ref", ""),
173
+ ))
174
+ corpus = HandleCorpus()
175
+ for o in obs:
176
+ corpus.observe(o.qualified)
177
+ hclaims = all_claims(obs, corpus)
178
+ for c in hclaims:
179
+ engine.graph.add_claim(c)
180
+ hc = correlation_points(hclaims)
181
+ stats["handle_observations"] = len(obs)
182
+ stats["handle_confidence"] = f"{hc.level.value} ({hc.points} points)"
183
+ warnings.append(f"handle correlation: {hc.caveat}")
184
+ trail.infer(f"Handle correlation assessed: {hc.level.value}",
185
+ basis=hc.caveat)
186
+
187
+ # --- evidence policy block ---------------------------------------------- #
188
+ if ev is not None:
189
+ ev.fetch_policy = policy.summary([])
190
+ paths = write_evidence_package(ev)
191
+ ok, problems = ev.verify()
192
+ stats["evidence_verified"] = ok
193
+ if not ok:
194
+ warnings.append(
195
+ "EVIDENCE VERIFICATION FAILED — do not present these findings: "
196
+ + "; ".join(problems[:3]))
197
+
198
+ outputs = write_all(engine.graph, resolution, scope, out,
199
+ show_scores=show_scores, trail=trail)
200
+ if ev is not None:
201
+ outputs += paths
202
+
203
+ return SuiteResult(scope=scope, graph=engine.graph, resolution=resolution,
204
+ trail=trail, evidence=ev, outputs=outputs,
205
+ warnings=warnings, stats=stats)
@@ -0,0 +1,32 @@
1
+ """Version reporting across the suite.
2
+
3
+ Every report and evidence manifest should be able to state which versions
4
+ produced it. A finding that cannot name its toolchain is hard to re-examine
5
+ later, especially once the scoring model has moved.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import importlib
11
+ import importlib.metadata
12
+
13
+ PACKAGES = ("attribution_graph", "adtx_attribution", "handle_correlation")
14
+
15
+
16
+ def versions() -> dict[str, str]:
17
+ out: dict[str, str] = {}
18
+ for name in PACKAGES:
19
+ try:
20
+ mod = importlib.import_module(name)
21
+ out[name] = getattr(mod, "__version__", "unknown")
22
+ except ImportError:
23
+ out[name] = "not installed"
24
+ try:
25
+ out["attribution_suite"] = importlib.metadata.version("attribution-suite")
26
+ except importlib.metadata.PackageNotFoundError:
27
+ out["attribution_suite"] = "dev"
28
+ return out
29
+
30
+
31
+ def banner() -> str:
32
+ return " | ".join(f"{k.replace('_', '-')} {v}" for k, v in versions().items())
@@ -0,0 +1,127 @@
1
+ Metadata-Version: 2.5
2
+ Name: attribution-suite
3
+ Version: 0.6.0
4
+ Summary: One install and one CLI over the attribution-graph toolchain
5
+ Project-URL: Homepage, https://github.com/OWNER/attribution-suite
6
+ Author: Tushar Karumudi
7
+ License-Expression: Apache-2.0
8
+ License-File: LICENSE
9
+ Keywords: attribution,entity-resolution,osint,threat-intelligence
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Information Technology
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Topic :: Security
16
+ Requires-Python: >=3.11
17
+ Requires-Dist: adtx-attribution>=0.6.0
18
+ Requires-Dist: attribution-graph>=0.6.0
19
+ Requires-Dist: handle-correlation>=0.6.0
20
+ Provides-Extra: dev
21
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
22
+ Requires-Dist: pytest>=8.0; extra == 'dev'
23
+ Requires-Dist: ruff>=0.6; extra == 'dev'
24
+ Description-Content-Type: text/markdown
25
+
26
+ # attribution-suite
27
+
28
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
29
+
30
+ One install and one CLI over the attribution toolchain.
31
+
32
+ ```bash
33
+ pip install attribution-suite
34
+ attribution run --case case.yaml --index adtx.sqlite --out ./out
35
+ ```
36
+
37
+ ## Why the packages are separate at all
38
+
39
+ [`attribution-graph`](https://github.com/OWNER/attribution-graph) is a pure
40
+ inference library with no network I/O — that is what makes its scoring auditable,
41
+ since every number is a function of claims plus index counts with no hidden
42
+ network state. [`adtx-attribution`](https://github.com/OWNER/adtx-attribution)
43
+ carries the collectors and their dependencies.
44
+ [`handle-correlation`](https://github.com/OWNER/handle-correlation) is
45
+ independent of both.
46
+
47
+ Someone who only wants the scoring model should not have to install an HTTP
48
+ client, and someone writing their own collectors should not inherit ours. This
49
+ package exists for when you want all of it.
50
+
51
+ ## Unified run
52
+
53
+ One case file drives the whole chain:
54
+
55
+ ```bash
56
+ attribution run \
57
+ --case case.yaml \
58
+ --index adtx.sqlite \
59
+ --handles observed_handles.csv \
60
+ --spiderfoot scan.db \
61
+ --opencti bundle.json \
62
+ --robin investigations/kraken.json \
63
+ --out ./out
64
+ ```
65
+
66
+ Robin handles feed the handle-correlation pass automatically, carrying the
67
+ durable identifiers found alongside them. `.onion`-derived claims raise a warning
68
+ in the run summary: those sources have no archive and no preserved body, so they
69
+ cannot be verified after the fact by anyone, including you.
70
+
71
+ Order is fixed, and the ordering is the point: imported claims seed the frontier
72
+ before collection, adversarial checks run before scoring so a planted identifier
73
+ never reaches the model at full weight, and evidence verification runs before
74
+ reporting so findings from a package that failed its integrity check are never
75
+ presented. **`attribution run` exits non-zero if verification fails**, so a
76
+ scripted caller can detect an unpresentable result.
77
+
78
+ ## Passthrough commands
79
+
80
+ ```bash
81
+ attribution index build --domains tranco.txt --db adtx.sqlite
82
+ attribution portfolio scraper-site.example --index adtx.sqlite --registrants
83
+ attribution handles --observations handles.csv --corpus usernames.txt
84
+ attribution registries --jurisdiction IN
85
+ attribution verify ./out/evidence
86
+ attribution version
87
+ ```
88
+
89
+ These delegate to the component CLIs rather than duplicating their flags.
90
+
91
+ ## Outputs
92
+
93
+ | File | What it is |
94
+ |---|---|
95
+ | `attribution_report.md` / `.html` | Findings, ICD 203 language, source terms |
96
+ | `verification_trail.md` | Ordered timestamped steps with numbered citations |
97
+ | `investigation_graph.json` | Every claim with full provenance |
98
+ | `entities.ftm.json` | FollowTheMoney — loads into yente / Aleph |
99
+ | `graph.cypher` | Neo4j |
100
+ | `evidence/evidence_manifest.json` | Hash-chained capture record |
101
+ | `evidence/verify.py` | Standalone integrity checker, no dependencies |
102
+ | `evidence/DECLARATION_DRAFT.md` | Qualified-person certification skeleton |
103
+
104
+ ## Collection policy
105
+
106
+ `robots_policy` in the case file: `respect`, `record` (default), or `ignore`.
107
+
108
+ There is no silent enforcement — robots.txt is routinely bypassed in practice and
109
+ a library pretending otherwise would be enforcing an abandoned norm. What matters
110
+ for this toolchain is different: the output is meant to survive review, and the
111
+ question there is never "did the tool obey robots.txt" but "can you state what
112
+ your collection policy was". Whichever setting you choose is written into the
113
+ evidence manifest and the declaration draft.
114
+
115
+ In practice it rarely bites. RDAP, crt.sh, GLEIF, EDGAR, `sellers.json` and
116
+ `ads.txt` are all published for machine consumption; only imprint scraping and
117
+ county-records HTML touch robots-relevant paths.
118
+
119
+ ## Version reporting
120
+
121
+ Every run prints the version of each component, and `attribution version` reports
122
+ them. A finding that cannot name its toolchain is hard to re-examine once the
123
+ scoring model has moved.
124
+
125
+ ## License
126
+
127
+ Apache-2.0.
@@ -0,0 +1,9 @@
1
+ attribution_suite/__init__.py,sha256=5gU2pW8jO76NZT_0vH1_fZmccr1-rh3YULXoHNrZIs4,914
2
+ attribution_suite/cli.py,sha256=6CoS-PJLv51XmzIh7Q7UZVU_m7pyBcNo7bguHn5rYTY,4433
3
+ attribution_suite/runner.py,sha256=Uj2LQ22K9IvMmCT0ARMdiyYYJFTHf8SKRBWI6xTYdr4,7942
4
+ attribution_suite/version.py,sha256=NgMbEF9gYNlaH2ZuoIyOn-40DMNg1aWriw1f_ZoV1g8,991
5
+ attribution_suite-0.6.0.dist-info/METADATA,sha256=lQz5tDRCKt1agLl26JpauU07xtTDS0Vgr0jz2tc2js4,4937
6
+ attribution_suite-0.6.0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
7
+ attribution_suite-0.6.0.dist-info/entry_points.txt,sha256=vuQ-IYy5E4lZaXXDw1E6qh_skVD5BM3QwNuVekR1HGg,59
8
+ attribution_suite-0.6.0.dist-info/licenses/LICENSE,sha256=diJzw2EhBqyzpohXLQMCXHaITCJy252K22adrNsvfBQ,11390
9
+ attribution_suite-0.6.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ attribution = attribution_suite.cli:_cli
@@ -0,0 +1,204 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
203
+
204
+ Copyright 2026 Tushar Karumudi