nifra 0.2.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 (104) hide show
  1. nifra-0.2.0/.github/ISSUE_TEMPLATE/attack-case-submission.md +46 -0
  2. nifra-0.2.0/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
  3. nifra-0.2.0/.github/workflows/ci.yml +60 -0
  4. nifra-0.2.0/.github/workflows/publish.yml +52 -0
  5. nifra-0.2.0/.gitignore +48 -0
  6. nifra-0.2.0/CONTRIBUTING.md +97 -0
  7. nifra-0.2.0/LICENSE +184 -0
  8. nifra-0.2.0/PKG-INFO +508 -0
  9. nifra-0.2.0/README.md +468 -0
  10. nifra-0.2.0/SECURITY.md +45 -0
  11. nifra-0.2.0/action.yml +168 -0
  12. nifra-0.2.0/attacks/README.md +58 -0
  13. nifra-0.2.0/attacks/data-exfiltration/api-key-disclosure-002.yaml +61 -0
  14. nifra-0.2.0/attacks/data-exfiltration/architecture-disclosure-005.yaml +65 -0
  15. nifra-0.2.0/attacks/data-exfiltration/cross-user-context-bleeding-004.yaml +65 -0
  16. nifra-0.2.0/attacks/data-exfiltration/pii-leak-via-output-001.yaml +60 -0
  17. nifra-0.2.0/attacks/data-exfiltration/training-data-extraction-003.yaml +68 -0
  18. nifra-0.2.0/attacks/excessive-agency/.gitkeep +0 -0
  19. nifra-0.2.0/attacks/excessive-agency/autonomous-deployment-001.yaml +65 -0
  20. nifra-0.2.0/attacks/excessive-agency/financial-transaction-004.yaml +65 -0
  21. nifra-0.2.0/attacks/excessive-agency/runaway-agent-loop-003.yaml +68 -0
  22. nifra-0.2.0/attacks/excessive-agency/unrestricted-browsing-002.yaml +67 -0
  23. nifra-0.2.0/attacks/insecure-output/insecure-deserialization-005.yaml +76 -0
  24. nifra-0.2.0/attacks/insecure-output/log-injection-004.yaml +67 -0
  25. nifra-0.2.0/attacks/insecure-output/sql-injection-via-llm-output-002.yaml +68 -0
  26. nifra-0.2.0/attacks/insecure-output/ssrf-via-llm-url-003.yaml +68 -0
  27. nifra-0.2.0/attacks/insecure-output/xss-markdown-rendering-001.yaml +67 -0
  28. nifra-0.2.0/attacks/prompt-injection/indirect-injection-002.yaml +62 -0
  29. nifra-0.2.0/attacks/prompt-injection/memory-poisoning-003.yaml +67 -0
  30. nifra-0.2.0/attacks/prompt-injection/multi-agent-escalation-005.yaml +69 -0
  31. nifra-0.2.0/attacks/prompt-injection/rag-poisoning-001.yaml +62 -0
  32. nifra-0.2.0/attacks/prompt-injection/system-prompt-exfiltration-004.yaml +70 -0
  33. nifra-0.2.0/attacks/prompt-injection/tool-call-injection-006.yaml +69 -0
  34. nifra-0.2.0/attacks/supply-chain/.gitkeep +0 -0
  35. nifra-0.2.0/attacks/supply-chain/malicious-package-001.yaml +74 -0
  36. nifra-0.2.0/attacks/supply-chain/model-weight-tampering-002.yaml +71 -0
  37. nifra-0.2.0/attacks/supply-chain/prompt-template-injection-004.yaml +67 -0
  38. nifra-0.2.0/attacks/supply-chain/vectorstore-poisoning-003.yaml +78 -0
  39. nifra-0.2.0/attacks/tool-abuse/code-execution-003.yaml +68 -0
  40. nifra-0.2.0/attacks/tool-abuse/email-sender-abuse-005.yaml +63 -0
  41. nifra-0.2.0/attacks/tool-abuse/filesystem-escape-002.yaml +60 -0
  42. nifra-0.2.0/attacks/tool-abuse/filesystem-write-abuse-006.yaml +64 -0
  43. nifra-0.2.0/attacks/tool-abuse/sql-injection-tool-004.yaml +68 -0
  44. nifra-0.2.0/attacks/tool-abuse/ssrf-via-agent-001.yaml +57 -0
  45. nifra-0.2.0/docs/architecture.md +181 -0
  46. nifra-0.2.0/docs/engineering.md +114 -0
  47. nifra-0.2.0/examples/langchain-agent/.gitkeep +0 -0
  48. nifra-0.2.0/examples/openai-functions/.gitkeep +0 -0
  49. nifra-0.2.0/nifra/__init__.py +3 -0
  50. nifra-0.2.0/nifra/cli/__init__.py +0 -0
  51. nifra-0.2.0/nifra/cli/commands/__init__.py +0 -0
  52. nifra-0.2.0/nifra/cli/commands/fix.py +756 -0
  53. nifra-0.2.0/nifra/cli/commands/report.py +173 -0
  54. nifra-0.2.0/nifra/cli/commands/reproduce.py +228 -0
  55. nifra-0.2.0/nifra/cli/commands/scan.py +151 -0
  56. nifra-0.2.0/nifra/cli/main.py +25 -0
  57. nifra-0.2.0/nifra/detectors/__init__.py +0 -0
  58. nifra-0.2.0/nifra/detectors/ast_parser.py +246 -0
  59. nifra-0.2.0/nifra/detectors/dependency_scanner.py +234 -0
  60. nifra-0.2.0/nifra/detectors/js_parser.py +383 -0
  61. nifra-0.2.0/nifra/detectors/pattern_registry.py +92 -0
  62. nifra-0.2.0/nifra/graph/__init__.py +0 -0
  63. nifra-0.2.0/nifra/graph/builder.py +284 -0
  64. nifra-0.2.0/nifra/graph/edges.py +79 -0
  65. nifra-0.2.0/nifra/graph/nodes.py +165 -0
  66. nifra-0.2.0/nifra/graph/rules/__init__.py +103 -0
  67. nifra-0.2.0/nifra/graph/rules/data_exfiltration.py +135 -0
  68. nifra-0.2.0/nifra/graph/rules/prompt_injection.py +130 -0
  69. nifra-0.2.0/nifra/graph/rules/supply_chain.py +120 -0
  70. nifra-0.2.0/nifra/graph/rules/tool_abuse.py +118 -0
  71. nifra-0.2.0/nifra/reasoning/__init__.py +0 -0
  72. nifra-0.2.0/nifra/reasoning/confidence.py +30 -0
  73. nifra-0.2.0/nifra/reasoning/engine.py +255 -0
  74. nifra-0.2.0/nifra/reasoning/prompts/exploit_chain.txt +62 -0
  75. nifra-0.2.0/nifra/reporters/__init__.py +0 -0
  76. nifra-0.2.0/nifra/reporters/cli_reporter.py +135 -0
  77. nifra-0.2.0/nifra/reporters/html_reporter.py +151 -0
  78. nifra-0.2.0/nifra/reporters/json_reporter.py +47 -0
  79. nifra-0.2.0/nifra/reporters/markdown_reporter.py +114 -0
  80. nifra-0.2.0/nifra/reporters/sarif_reporter.py +247 -0
  81. nifra-0.2.0/playground/README.md +60 -0
  82. nifra-0.2.0/playground/vulnerable-rag-agent/app.py +99 -0
  83. nifra-0.2.0/playground/vulnerable-rag-agent/requirements.txt +5 -0
  84. nifra-0.2.0/playground/vulnerable-tool-agent/app.py +95 -0
  85. nifra-0.2.0/playground/vulnerable-tool-agent/requirements.txt +5 -0
  86. nifra-0.2.0/pyproject.toml +80 -0
  87. nifra-0.2.0/tests/__init__.py +0 -0
  88. nifra-0.2.0/tests/e2e/__init__.py +0 -0
  89. nifra-0.2.0/tests/e2e/test_full_pipeline.py +299 -0
  90. nifra-0.2.0/tests/integration/.gitkeep +0 -0
  91. nifra-0.2.0/tests/unit/.gitkeep +0 -0
  92. nifra-0.2.0/tests/unit/test_ast_parser.py +135 -0
  93. nifra-0.2.0/tests/unit/test_cli_report.py +226 -0
  94. nifra-0.2.0/tests/unit/test_cli_reproduce.py +310 -0
  95. nifra-0.2.0/tests/unit/test_cli_scan.py +132 -0
  96. nifra-0.2.0/tests/unit/test_confidence.py +31 -0
  97. nifra-0.2.0/tests/unit/test_dependency_scanner.py +145 -0
  98. nifra-0.2.0/tests/unit/test_fix_command.py +361 -0
  99. nifra-0.2.0/tests/unit/test_graph_builder.py +527 -0
  100. nifra-0.2.0/tests/unit/test_js_parser.py +419 -0
  101. nifra-0.2.0/tests/unit/test_reasoning_engine.py +427 -0
  102. nifra-0.2.0/tests/unit/test_reporters.py +420 -0
  103. nifra-0.2.0/tests/unit/test_risk_rules.py +389 -0
  104. nifra-0.2.0/tests/unit/test_sarif_reporter.py +303 -0
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: "🎯 New Attack Case"
3
+ about: "Submit a new AI application attack scenario for the community library"
4
+ title: "[ATTACK CASE] "
5
+ labels: ["attack-case", "community"]
6
+ ---
7
+
8
+ ## Attack Case Submission
9
+
10
+ Before submitting, check `attacks/README.md` for the YAML schema.
11
+
12
+ ## YAML Draft
13
+
14
+ ```yaml
15
+ id: PI-XXX # Use the next available ID in the relevant category
16
+ name: ""
17
+ owasp_ref: # LLM01 / LLM02 / etc.
18
+ severity: # critical | high | medium | low
19
+ description: |
20
+
21
+ conditions:
22
+ requires:
23
+ - key: value
24
+
25
+ exploit_template: |
26
+ # Do NOT include fully weaponized payloads.
27
+ # Show the structure/pattern, not a ready-to-use weapon.
28
+
29
+ expected_behavior: ""
30
+ impact: ""
31
+ remediation:
32
+ - ""
33
+ references:
34
+ - ""
35
+ ```
36
+
37
+ ## Evidence / References
38
+
39
+ Please provide at least one public reference (CVE, paper, blog post, OWASP entry) that backs this attack scenario.
40
+
41
+ ## Checklist
42
+
43
+ - [ ] No fully weaponized payloads
44
+ - [ ] Public reference provided
45
+ - [ ] Tested against a real application (or clear theoretical basis)
46
+ - [ ] Remediation steps are actionable
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: "🐛 Bug Report"
3
+ about: "Report a bug in NIfra's detection, reasoning, or CLI"
4
+ title: "[BUG] "
5
+ labels: ["bug"]
6
+ ---
7
+
8
+ ## Describe the bug
9
+
10
+ A clear description of what the bug is.
11
+
12
+ ## To Reproduce
13
+
14
+ ```bash
15
+ nifra scan ./my-project
16
+ # or
17
+ nifra reproduce --case 001
18
+ ```
19
+
20
+ Steps to reproduce the behavior:
21
+ 1. ...
22
+
23
+ ## Expected behavior
24
+
25
+ What you expected to happen.
26
+
27
+ ## Actual behavior
28
+
29
+ What actually happened (include full CLI output if possible).
30
+
31
+ ## Environment
32
+
33
+ - OS:
34
+ - Python version:
35
+ - NIfra version: (`nifra --version`)
36
+ - AI Stack (LangChain / OpenAI / etc.):
@@ -0,0 +1,60 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, develop]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: Test (Python ${{ matrix.python-version }})
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ python-version: ["3.10", "3.11", "3.12"]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Set up Python ${{ matrix.python-version }}
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+ cache: pip
25
+
26
+ - name: Install dependencies
27
+ run: |
28
+ pip install -e ".[dev]"
29
+
30
+ - name: Lint with ruff
31
+ run: ruff check .
32
+
33
+ - name: Type check with mypy
34
+ run: mypy nifra/ --ignore-missing-imports
35
+
36
+ - name: Run tests
37
+ run: pytest --cov=nifra --cov-report=xml
38
+
39
+ - name: Upload coverage
40
+ uses: codecov/codecov-action@v4
41
+ with:
42
+ file: ./coverage.xml
43
+ fail_ci_if_error: false
44
+
45
+ attack-cases-lint:
46
+ name: Validate Attack Cases YAML
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+
51
+ - name: Set up Python
52
+ uses: actions/setup-python@v5
53
+ with:
54
+ python-version: "3.11"
55
+
56
+ - name: Install yamllint
57
+ run: pip install yamllint
58
+
59
+ - name: Validate attack case YAML files
60
+ run: yamllint attacks/ -d relaxed
@@ -0,0 +1,52 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ build:
12
+ name: Build distribution
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.12"
22
+
23
+ - name: Install build tools
24
+ run: python -m pip install --upgrade build
25
+
26
+ - name: Build wheel and sdist
27
+ run: python -m build
28
+
29
+ - name: Upload dist artifacts
30
+ uses: actions/upload-artifact@v4
31
+ with:
32
+ name: dist
33
+ path: dist/
34
+
35
+ publish:
36
+ name: Publish to PyPI
37
+ needs: build
38
+ runs-on: ubuntu-latest
39
+ environment: pypi
40
+
41
+ permissions:
42
+ id-token: write # Required for OIDC trusted publisher
43
+
44
+ steps:
45
+ - name: Download dist artifacts
46
+ uses: actions/download-artifact@v4
47
+ with:
48
+ name: dist
49
+ path: dist/
50
+
51
+ - name: Publish to PyPI
52
+ uses: pypa/gh-action-pypi-publish@release/v1
nifra-0.2.0/.gitignore ADDED
@@ -0,0 +1,48 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+ *.pyd
6
+ *.so
7
+ *.egg
8
+ *.egg-info/
9
+ dist/
10
+ build/
11
+ *.whl
12
+ MANIFEST
13
+
14
+ # Virtual environments
15
+ .venv/
16
+ venv/
17
+ env/
18
+ .env
19
+ .env.*
20
+
21
+ # Pytest / coverage
22
+ .pytest_cache/
23
+ .coverage
24
+ .coverage.*
25
+ htmlcov/
26
+ coverage.xml
27
+
28
+ # NIfra scan output — may contain LLM-generated exploit payloads
29
+ nifra-results.json
30
+ nifra-report.html
31
+ nifra-report.md
32
+
33
+ # IDE / editors
34
+ .idea/
35
+ .vscode/
36
+ *.swp
37
+ *.swo
38
+ *~
39
+
40
+ # OS
41
+ .DS_Store
42
+ Thumbs.db
43
+
44
+ # Secrets
45
+ *.key
46
+ *.pem
47
+ *.p12
48
+ .secrets
@@ -0,0 +1,97 @@
1
+ # Contributing to NIfra
2
+
3
+ Thank you for contributing to NIfra. Security tooling is a community effort.
4
+
5
+ ## Ways to Contribute
6
+
7
+ ### 1. Attack Cases (Highest Impact — No Python Required)
8
+
9
+ Submit YAML files to `attacks/`. Security researchers, pentesters, and AI security
10
+ practitioners can contribute expertise without needing to understand the codebase.
11
+
12
+ See [`attacks/README.md`](../attacks/README.md) for the YAML schema.
13
+
14
+ **Good first contribution:** If you've found an interesting AI vulnerability pattern
15
+ that isn't covered yet, write it up as a YAML case.
16
+
17
+ ### 2. Detection Rules
18
+
19
+ Add new risk rules to `nifra/graph/rules/`. Each rule is a Python class:
20
+
21
+ ```python
22
+ from nifra.graph.rules import BaseRiskRule, RiskFinding, Severity
23
+
24
+ class MyNewRule(BaseRiskRule):
25
+ rule_id = "XX-001"
26
+ rule_name = "Short descriptive name"
27
+ severity = Severity.HIGH
28
+ owasp_ref = "LLM01"
29
+
30
+ def evaluate(self, graph: nx.DiGraph) -> list[RiskFinding]:
31
+ findings = []
32
+ # traverse the graph, return RiskFinding objects
33
+ return findings
34
+ ```
35
+
36
+ Then register it in `nifra/graph/rules/__init__.py`.
37
+
38
+ ### 3. Framework Patterns
39
+
40
+ Add new LLM framework patterns to `nifra/detectors/pattern_registry.py`.
41
+ If a new framework (e.g., a new agent library) isn't detected, this is the place to add it.
42
+
43
+ ### 4. Core Engine
44
+
45
+ Contribution areas:
46
+ - Improve AST pattern detection accuracy
47
+ - Add JavaScript/TypeScript support
48
+ - Improve graph edge inference
49
+ - Add new report formats
50
+
51
+ ## Development Setup
52
+
53
+ ```bash
54
+ git clone https://github.com/reyracom/Nifra-Agent.git
55
+ cd Nifra-Agent
56
+ pip install -e ".[dev]"
57
+ ```
58
+
59
+ Run tests:
60
+
61
+ ```bash
62
+ pytest
63
+ ```
64
+
65
+ Lint:
66
+
67
+ ```bash
68
+ ruff check .
69
+ ```
70
+
71
+ ## Pull Request Guidelines
72
+
73
+ 1. **One PR = one concern.** Don't mix attack cases with code changes.
74
+ 2. **Test your changes.** Every code change needs a test.
75
+ 3. **Attack cases need evidence.** Link to a CVE, paper, or public disclosure.
76
+ 4. **No weaponized payloads.** Attack case payloads must show structure, not full weapons.
77
+ 5. **Follow the code style.** Run `ruff check .` before submitting.
78
+
79
+ ## Code of Conduct
80
+
81
+ NIfra follows the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
82
+
83
+ ## License
84
+
85
+ By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.
86
+
87
+ ---
88
+
89
+ ## Supporting the Project
90
+
91
+ NIfra is built and maintained by **[ReyraLabs](https://reyralabs.com)** — a security research lab from Surabaya, Indonesia 🇮🇩.
92
+
93
+ If this project has been valuable to you or your organization, consider sponsoring its development:
94
+
95
+ **💠 USDC (Base Network):** `0xace4ac1f6ccf9782fd8ec45b2bfeca265392a154`
96
+
97
+ All funds go directly toward research, new attack cases, and framework support.
nifra-0.2.0/LICENSE ADDED
@@ -0,0 +1,184 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship made available under
36
+ the License, as indicated by a copyright notice that is included in
37
+ or attached to the work (an example is provided in the Appendix below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean, as submitted to the Licensor for inclusion
48
+ in the Work by the copyright owner or by an individual or Legal Entity
49
+ authorized to submit on behalf of the copyright owner. For the purposes
50
+ of this definition, "submitted" means any form of electronic, verbal,
51
+ or written communication sent to the Licensor or its representatives,
52
+ including but not limited to communication on electronic mailing lists,
53
+ source code control systems, and issue tracking systems that are managed
54
+ by, or on behalf of, the Licensor for the purpose of discussing and
55
+ improving the Work, but excluding communication that is conspicuously
56
+ marked or designated in writing by the copyright owner as
57
+ "Not a Contribution."
58
+
59
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
60
+ whom a Contribution has been received by the Licensor and subsequently
61
+ incorporated within the Work.
62
+
63
+ 2. Grant of Copyright License. Subject to the terms and conditions of
64
+ this License, each Contributor hereby grants to You a perpetual,
65
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
66
+ copyright license to reproduce, prepare Derivative Works of,
67
+ publicly display, publicly perform, sublicense, and distribute the
68
+ Work and such Derivative Works in Source or Object form.
69
+
70
+ 3. Grant of Patent License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ (except as stated in this section) patent license to make, have made,
74
+ use, offer to sell, sell, import, and otherwise transfer the Work,
75
+ where such license applies only to those patent claims licensable
76
+ by such Contributor that are necessarily infringed by their
77
+ Contribution(s) alone or by the combination of their Contribution(s)
78
+ with the Work to which such Contribution(s) was submitted. If You
79
+ institute patent litigation against any entity (including a cross-claim
80
+ or counterclaim in a lawsuit) alleging that the Work or any
81
+ Contribution embodied within the Work constitutes direct or contributory
82
+ patent infringement, then any patent licenses granted to You under
83
+ this License for that Work shall terminate as of the date such
84
+ litigation is filed.
85
+
86
+ 4. Redistribution. You may reproduce and distribute copies of the
87
+ Work or Derivative Works thereof in any medium, with or without
88
+ modifications, and in Source or Object form, provided that You
89
+ meet the following conditions:
90
+
91
+ (a) You must give any other recipients of the Work or
92
+ Derivative Works a copy of this License; and
93
+
94
+ (b) You must cause any modified files to carry prominent notices
95
+ stating that You changed the files; and
96
+
97
+ (c) You must retain, in the Source form of any Derivative Works
98
+ that You distribute, all copyright, patent, trademark, and
99
+ attribution notices from the Source form of the Work,
100
+ excluding those notices that do not pertain to any part of
101
+ the Derivative Works; and
102
+
103
+ (d) If the Work includes a "NOTICE" text file as part of its
104
+ distribution, You must include a readable copy of the
105
+ attribution notices contained within such NOTICE file, in
106
+ at least one of the following places: within a NOTICE text
107
+ file distributed as part of the Derivative Works; within
108
+ the Source form or documentation, if provided along with the
109
+ Derivative Works; or, within a display generated by the
110
+ Derivative Works, if and wherever such third-party notices
111
+ normally appear. The contents of the NOTICE file are for
112
+ informational purposes only and do not modify the License.
113
+ You may add Your own attribution notices within Derivative
114
+ Works that You distribute, alongside or as an addendum to
115
+ the NOTICE text from the Work, provided that such additional
116
+ attribution notices cannot be construed as modifying the License.
117
+
118
+ You may add Your own license statement for Your modifications and
119
+ may provide additional grant of rights to use, copy, modify, merge,
120
+ publish, distribute, sublicense, and/or sell copies of Your modifications,
121
+ and to provide to persons to whom the modifications are furnished to do
122
+ so, subject to the following conditions:
123
+
124
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
125
+ any Contribution intentionally submitted for inclusion in the Work
126
+ by You to the Licensor shall be under the terms and conditions of
127
+ this License, without any additional terms or conditions.
128
+ Notwithstanding the above, nothing herein shall supersede or modify
129
+ the terms of any separate license agreement you may have executed
130
+ with Licensor regarding such Contributions.
131
+
132
+ 6. Trademarks. This License does not grant permission to use the trade
133
+ names, trademarks, service marks, or product names of the Licensor,
134
+ except as required for reasonable and customary use in describing the
135
+ origin of the Work and reproducing the content of the NOTICE file.
136
+
137
+ 7. Disclaimer of Warranty. Unless required by applicable law or
138
+ agreed to in writing, Licensor provides the Work (and each
139
+ Contributor provides its Contributions) on an "AS IS" BASIS,
140
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
141
+ implied, including, without limitation, any warranties or conditions
142
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
143
+ PARTICULAR PURPOSE. You are solely responsible for determining the
144
+ appropriateness of using or reproducing the Work and assume any
145
+ risks associated with Your exercise of permissions under this License.
146
+
147
+ 8. Limitation of Liability. In no event and under no legal theory,
148
+ whether in tort (including negligence), contract, or otherwise,
149
+ unless required by applicable law (such as deliberate and grossly
150
+ negligent acts) or agreed to in writing, shall any Contributor be
151
+ liable to You for damages, including any direct, indirect, special,
152
+ incidental, or exemplary damages of any character arising as a
153
+ result of this License or out of the use or inability to use the
154
+ Work (including but not limited to damages for loss of goodwill,
155
+ work stoppage, computer failure or malfunction, or all other
156
+ commercial damages or losses), even if such Contributor has been
157
+ advised of the possibility of such damages.
158
+
159
+ 9. Accepting Warranty or Additional Liability. While redistributing
160
+ the Work or Derivative Works thereof, You may choose to offer,
161
+ and charge a fee for, acceptance of support, warranty, indemnity,
162
+ or other liability obligations and/or rights consistent with this
163
+ License. However, in accepting such obligations, You may offer only
164
+ conditions consistent with this License (not on behalf of any other
165
+ Contributor), and only if You agree to indemnify, defend, and hold
166
+ each Contributor harmless for any liability incurred by, or claims
167
+ asserted against, such Contributor by reason of your accepting any
168
+ such warranty or additional liability.
169
+
170
+ END OF TERMS AND CONDITIONS
171
+
172
+ Copyright 2026 NIfra Contributors
173
+
174
+ Licensed under the Apache License, Version 2.0 (the "License");
175
+ you may not use this file except in compliance with the License.
176
+ You may obtain a copy of the License at
177
+
178
+ http://www.apache.org/licenses/LICENSE-2.0
179
+
180
+ Unless required by applicable law or agreed to in writing, software
181
+ distributed under the License is distributed on an "AS IS" BASIS,
182
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
183
+ See the License for the specific language governing permissions and
184
+ limitations under the License.