preflight-engine 0.1.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,271 @@
1
+ Metadata-Version: 2.5
2
+ Name: preflight-engine
3
+ Version: 0.1.0
4
+ Summary: Infrastructure change risk analysis engine for Terraform plans
5
+ Project-URL: Homepage, https://github.com/adityacodes-root/Preflight
6
+ Project-URL: Documentation, https://github.com/adityacodes-root/Preflight#readme
7
+ Project-URL: Repository, https://github.com/adityacodes-root/Preflight.git
8
+ Project-URL: Issues, https://github.com/adityacodes-root/Preflight/issues
9
+ Project-URL: Changelog, https://github.com/adityacodes-root/Preflight/releases
10
+ Author: Preflight Contributors
11
+ License: Apache-2.0
12
+ License-File: LICENSE
13
+ Keywords: ci-cd,cloud,devops,infrastructure,risk-analysis,security,terraform
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: Information Technology
18
+ Classifier: Intended Audience :: System Administrators
19
+ Classifier: License :: OSI Approved :: Apache Software License
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Topic :: Security
26
+ Classifier: Topic :: Software Development :: Quality Assurance
27
+ Requires-Python: >=3.12
28
+ Requires-Dist: pydantic>=2.7.0
29
+ Requires-Dist: pyyaml>=6.0
30
+ Requires-Dist: rich>=13.7.0
31
+ Requires-Dist: typer>=0.12.0
32
+ Provides-Extra: dev
33
+ Requires-Dist: build>=1.2.0; extra == 'dev'
34
+ Requires-Dist: mypy>=1.10.0; extra == 'dev'
35
+ Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
36
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
37
+ Requires-Dist: ruff>=0.4.0; extra == 'dev'
38
+ Requires-Dist: twine>=5.0.0; extra == 'dev'
39
+ Requires-Dist: types-pyyaml>=6.0.12; extra == 'dev'
40
+ Description-Content-Type: text/markdown
41
+
42
+ # Preflight
43
+
44
+ Preflight is an infrastructure change risk analysis engine that parses Terraform plan JSON to detect destructive operations, security regressions, and architectural risks before deployment.
45
+
46
+ ```bash
47
+ terraform plan -out=tfplan
48
+ terraform show -json tfplan | preflight analyze -
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Performance & Quality Metrics
54
+
55
+ Measured across synthetic benchmarks and automated test suites:
56
+
57
+ | Metric | Measured Value | Standard |
58
+ |---|---|---|
59
+ | **Analysis Latency** | **< 0.50 ms** avg per plan | Sub-millisecond static evaluation |
60
+ | **Detection Rate** | **100%** (11/11 target scenarios) | Synthetic test fixtures |
61
+ | **False Positive Rate** | **0** on control fixtures | Clean control plans produce 0 findings |
62
+ | **Test Coverage** | **88%** statement coverage | 105 unit and integration tests |
63
+ | **Type Safety** | **100%** strictly typed | `mypy --strict` with zero warnings |
64
+ | **Code Quality** | **Zero errors** | Compliant with `ruff` linter and formatter |
65
+ | **Scoring Determinism** | **100% bit-for-bit identical** | Zero drift across 50 sequential runs |
66
+
67
+ ---
68
+
69
+ ## Installation
70
+
71
+ Requires Python 3.12+.
72
+
73
+ ### Recommended: Standalone CLI with `pipx`
74
+ Installs `preflight` into an isolated global environment so the binary is directly available in any terminal:
75
+
76
+ ```bash
77
+ # Install from PyPI:
78
+ pipx install preflight-engine
79
+
80
+ # Or install directly from GitHub:
81
+ pipx install git+https://github.com/adityacodes-root/Preflight.git
82
+ ```
83
+
84
+ ### With `uv` (Fastest)
85
+ ```bash
86
+ uv tool install preflight-engine
87
+ ```
88
+
89
+ ### Standard `pip`
90
+ ```bash
91
+ pip install preflight-engine
92
+ ```
93
+
94
+ ### From Source (Development)
95
+ ```bash
96
+ git clone https://github.com/adityacodes-root/Preflight.git
97
+ cd preflight
98
+ python -m venv .venv
99
+ source .venv/bin/activate # On Windows: .\.venv\Scripts\Activate.ps1
100
+ pip install -e ".[dev]"
101
+ ```
102
+
103
+ ---
104
+
105
+ ## Usage
106
+
107
+ ```bash
108
+ # Pipe directly via stdin (recommended for CI/CD)
109
+ terraform show -json tfplan | preflight analyze -
110
+ terraform show -json tfplan | preflight analyze - --fail-on high
111
+
112
+ # Publish or update sticky PR comment in CI
113
+ terraform show -json tfplan | preflight comment - --fail-on high
114
+
115
+ # Generate SARIF report for GitHub Code Scanning
116
+ terraform show -json tfplan | preflight analyze - --format sarif --output preflight.sarif
117
+
118
+ # Analyze a local plan file
119
+ preflight analyze plan.json
120
+ preflight analyze plan.json --fail-on high
121
+ preflight analyze plan.json --environment staging
122
+ preflight analyze plan.json --format markdown --output report.md
123
+ preflight analyze plan.json --format json --output report.json
124
+ ```
125
+
126
+ ### Options
127
+
128
+ | Option | Flag | Description | Default |
129
+ |---|---|---|---|
130
+ | `--environment` | `-e` | `development`, `staging`, or `production` | `production` |
131
+ | `--format` | `-f` | `terminal`, `json`, `markdown`, or `sarif` | `terminal` |
132
+ | `--fail-on` | | Block if findings reach: `low`, `moderate`, `high`, `critical` | *None* |
133
+ | `--output` | `-o` | Output file path | stdout |
134
+ | `--config` | `-c` | Custom YAML configuration path | `preflight.yaml` |
135
+ | `--verbose` | `-v` | Show traceback on error | `false` |
136
+ | `--version` | `-V` | Display version | |
137
+
138
+ ### Exit Codes
139
+
140
+ | Code | Status | Meaning |
141
+ |:---:|---|---|
142
+ | `0` | **Pass** | Analysis completed; no blocking policy conditions triggered. |
143
+ | `1` | **Block** | Analysis completed; a configured policy threshold was met. |
144
+ | `2` | **Error** | File not found, invalid JSON syntax, or bad configuration. |
145
+
146
+ ---
147
+
148
+ ## CI/CD & GitHub Integration
149
+
150
+ Preflight integrates directly into CI/CD pipelines to automate infrastructure risk gates and pull request reviews.
151
+
152
+ ### Pull Request Sticky Comments (`preflight comment`)
153
+ Posts an infrastructure risk analysis directly to active pull requests. Subsequent commits update the comment in place to prevent notification noise. Repository, token, and PR number are resolved automatically from environment variables (`GITHUB_REPOSITORY`, `GITHUB_TOKEN`, and `GITHUB_REF`).
154
+
155
+ ```bash
156
+ # In GitHub Actions
157
+ terraform show -json tfplan | preflight comment - --fail-on high
158
+
159
+ # Local test or manual invocation
160
+ preflight comment plan.json --repo owner/repo --pr 42 --token $GITHUB_TOKEN --dry-run
161
+ ```
162
+
163
+ ### SARIF Code Scanning (`--format sarif`)
164
+ Exports findings in OASIS SARIF v2.1.0 to surface inline risk annotations in GitHub Code Scanning, GitLab Security Dashboards, or Azure DevOps.
165
+
166
+ ```bash
167
+ terraform show -json tfplan | preflight analyze - --format sarif --output preflight.sarif
168
+ ```
169
+
170
+ See [.github/workflows/terraform-pr-check.yml](.github/workflows/terraform-pr-check.yml) for a complete GitHub Actions workflow.
171
+
172
+ ---
173
+
174
+ ## Risk Scoring Model
175
+
176
+ Preflight scores risks from `0.0` to `100.0` using five weighted dimensions:
177
+
178
+ | Factor | Weight | Evaluation Scope |
179
+ |---|:---:|---|
180
+ | **Change Impact** | 30% | Structural blast radius (in-place modification vs. resource recreation vs. deletion) |
181
+ | **Security Exposure** | 25% | External reachability, administrative port ingress, permissive IAM wildcards |
182
+ | **Reversibility** | 20% | Recovery complexity (permanent data loss vs. declarative attribute update) |
183
+ | **Environment Criticality** | 15% | Target tier: `development` (1.0/5), `staging` (3.0/5), `production` (5.0/5) |
184
+ | **Uncertainty** | 10% | Attributes computed at apply-time that cannot be evaluated statically |
185
+
186
+ $$\text{Score} = \sum_{i} \left( \text{Weight}_i \times \frac{\text{Factor Score}_i}{5.0} \right)$$
187
+
188
+ ### Risk Categories
189
+ - `0 – 24.9`: **Low** (tag updates, read-only data sources, benign attribute changes)
190
+ - `25 – 49.9`: **Moderate** (scoped additions, non-destructive replacements)
191
+ - `50 – 74.9`: **High** (recreations, destructive storage operations, broad IAM policies)
192
+ - `75 – 100.0`: **Critical** (public SSH/RDP, disabled S3 access blocks, DB deletion)
193
+
194
+ Overall plan risk is calculated as the maximum resource-level risk score to prevent critical issues from being masked by volume of benign changes.
195
+
196
+ ---
197
+
198
+ ## Detection Rules
199
+
200
+ ### Generic Rules
201
+ - `GEN-DEL-001`: Resource deletion in plan.
202
+ - `GEN-REP-001`: Resource replacement (destroy and recreate due to immutable attributes).
203
+ - `GEN-ACT-001`: Unrecognized or unsupported Terraform lifecycle action sequences.
204
+ - `GEN-UNK-001`: Computed unknown values in critical configuration fields.
205
+ - `GEN-DST-001`: Destructive changes to stateful resources (databases, volumes, clusters).
206
+
207
+ ### AWS Rules
208
+ - `AWS-NET-001`: Security group ingress opening administrative ports (22, 3389) or all traffic to `0.0.0.0/0` or `::/0`.
209
+ - `AWS-S3-001`: S3 Public Access Block removal or disabled settings (`block_public_acls`, `block_public_policy`, etc.), or public bucket ACLs.
210
+ - `AWS-IAM-001`: Context-sensitive IAM wildcard policies (`*` on `*` is Critical; service-level wildcards on `*` is High).
211
+ - `AWS-DB-001`: Deletion or replacement of RDS instances, Aurora clusters, DynamoDB tables, or ElastiCache clusters.
212
+
213
+ ### Azure Rules
214
+ - `AZR-NET-001`: Network Security Group (NSG) rules allowing `0.0.0.0/0` or `Internet` to ports 22, 3389, or wildcard `*`.
215
+ - `AZR-STG-001`: Storage account public blob access or missing firewall restrictions.
216
+ - `AZR-KV-001`: Azure Key Vault changes with `purge_protection_enabled = false` or soft delete retention < 7 days.
217
+ - `AZR-DB-001`: Deletion or replacement of Azure SQL, Cosmos DB, or PostgreSQL flexible servers.
218
+
219
+ ### Google Cloud Rules
220
+ - `GCP-FW-001`: Ingress compute firewall rules allowing `0.0.0.0/0` or `::/0` to sensitive administrative ports (22, 3389) or all traffic.
221
+ - `GCP-IAM-001`: Cloud Storage bucket IAM bindings or members granting access to `allUsers` or `allAuthenticatedUsers`.
222
+ - `GCP-SQL-001`: Cloud SQL instance deletion, replacement, or disabling `deletion_protection`.
223
+
224
+ ### Kubernetes Rules
225
+ - `K8S-SEC-001`: Workloads or Helm charts deploying with `security_context.privileged: true` or `hostNetwork: true`.
226
+ - `K8S-RBAC-001`: RoleBindings and ClusterRoleBindings binding to superuser role `cluster-admin`.
227
+
228
+ ---
229
+
230
+ ## Policy Configuration (`preflight.yaml`)
231
+
232
+ ```yaml
233
+ environment: production
234
+ format: terminal
235
+ fail_on: high
236
+
237
+ blocked_rules:
238
+ - AWS-DB-001
239
+ - AWS-NET-001
240
+
241
+ allowed_rules: []
242
+
243
+ max_score: 75.0
244
+ ```
245
+
246
+ ---
247
+
248
+ ## Defensive Redaction
249
+
250
+ Preflight prevents secrets and credentials from appearing in terminal output, CI logs, or pull request comments. The engine recursively redacts:
251
+ - Sensitive key names matching password, secret, token, api_key, private_key, or auth patterns.
252
+ - Terraform plan attributes flagged via `before_sensitive` and `after_sensitive` metadata.
253
+
254
+ ---
255
+
256
+ ## Verification & Benchmarks
257
+
258
+ ```bash
259
+ pytest
260
+ pytest --cov=preflight --cov-report=term-missing
261
+ ruff check .
262
+ ruff format --check .
263
+ mypy src tests
264
+ python scripts/benchmark.py
265
+ ```
266
+
267
+ ---
268
+
269
+ ## License
270
+
271
+ Apache-2.0
@@ -0,0 +1,23 @@
1
+ preflight/__init__.py,sha256=0lTmYoEM6gWg5fUCANFWWNhAdJPkhvSBMpBqPr2mhIo,84
2
+ preflight/cli.py,sha256=vThM-Nm2OUYZx46Gevxt0jic2ub6oATs1jE5obuAR94,18194
3
+ preflight/config.py,sha256=XsrjNhz9zDDL-zU03-ecmAxNkLrhHz9jtAdFdRn2a6s,3664
4
+ preflight/engine.py,sha256=Ypf7MAxBKNn-HvKhYeeYR6sSWSawlXSVgjbKjUIna7A,4154
5
+ preflight/github.py,sha256=BTNN32Sqai83BcqDVtuAjGEX9FGGHXTEt7h40Na12Zk,4467
6
+ preflight/models.py,sha256=ynYSSoMzoeUT6yXRoioekDVWuKKjzTZU2X6shTS6Ld8,8260
7
+ preflight/plan.py,sha256=a2AXKZm0GTKJh3X4pRWfsFCWKbjxG01XrfnsbVyp2Jg,6228
8
+ preflight/policy.py,sha256=Uj-Wbfkjr1r8BIYjqNOc3bSJfhYesFcEY2pUKTR2L0Y,2790
9
+ preflight/redaction.py,sha256=QDGfzeuVkf1RwmcEQ7yeMhNkcl-ox92NYoiydrrcxY0,1813
10
+ preflight/reporting.py,sha256=j9mV32WrEpi8_V2GrKzt_hghKrEQLwAjdh6Qgk4C7sw,16698
11
+ preflight/scoring.py,sha256=QpekTPUA4Kc4to4gg6QVUCY4ADLu50JS38jmHLVvf0s,4871
12
+ preflight/rules/__init__.py,sha256=i-FRpsYHxjoh8HQfEjYs7dAph5PdVi-Tm3RryrkYBJM,2619
13
+ preflight/rules/aws.py,sha256=9i7uKlucB1WCQsUt-Ipc4xQCVPrNVLoBqpmpA0P3XIA,24133
14
+ preflight/rules/azure.py,sha256=B_a6iXsDIMrHS2h2tnrTbBA9MKd8S-O7X8XSg4dN_HQ,11718
15
+ preflight/rules/base.py,sha256=JTUzDJravahPSzddw52yi7bFE5dXo869COGD7kUiAoI,634
16
+ preflight/rules/gcp.py,sha256=8HVlOafUwbiwzCeIaFBZtUwvejO2AH0ZW9oCQR_ILGc,10267
17
+ preflight/rules/generic.py,sha256=3ZZb632Atg8wp_h-2Uv70Q7mBuCzHkdMBR2NrSGgYiA,11238
18
+ preflight/rules/kubernetes.py,sha256=7dfkE-K8f3V8nsuRD01hO0DPFckhNFW6oje-mE86K8U,9599
19
+ preflight_engine-0.1.0.dist-info/METADATA,sha256=BSZ0HN0NfZgDfWNZ3MSVyhVgOFtI9Ykw99KW1myBwCc,10444
20
+ preflight_engine-0.1.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
21
+ preflight_engine-0.1.0.dist-info/entry_points.txt,sha256=VcW1tXHanw5ExFiAv-nHrUeDFl0-p85MiGw2YhnnI30,49
22
+ preflight_engine-0.1.0.dist-info/licenses/LICENSE,sha256=Kfa_K9kKLoq28ByAXkso1HdgWXzqL3R0eCIh88KD5ZQ,10120
23
+ preflight_engine-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ preflight = preflight.cli:main
@@ -0,0 +1,175 @@
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, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work.
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 any work of authorship, including
48
+ the original version of the Work and any modifications or additions
49
+ to that Work or Derivative Works thereof, that is intentionally
50
+ submitted to Licensor for inclusion in the Work by the copyright owner
51
+ or by an individual or Legal Entity authorized to submit on behalf of
52
+ the copyright owner. For the purposes of this definition, "submitted"
53
+ means any form of electronic, verbal, or written communication sent
54
+ to the Licensor or its representatives, including but not limited to
55
+ communication on electronic mailing lists, source code control systems,
56
+ and issue tracking systems that are managed by, or on behalf of, the
57
+ Licensor for the purpose of discussing and improving the Work, but
58
+ excluding communication that is conspicuously marked or otherwise
59
+ designated in writing by the copyright owner as "Not a Contribution."
60
+
61
+ "Contributor" shall mean Licensor and any individual or Legal Entity
62
+ on behalf of whom a Contribution has been received by Licensor and
63
+ subsequently incorporated within the Work.
64
+
65
+ 2. Grant of Copyright License. Subject to the terms and conditions of
66
+ this License, each Contributor hereby grants to You a perpetual,
67
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
68
+ copyright license to reproduce, prepare Derivative Works of,
69
+ publicly display, publicly perform, sublicense, and distribute the
70
+ Work and such Derivative Works in Source or Object form.
71
+
72
+ 3. Grant of Patent License. Subject to the terms and conditions of
73
+ this License, each Contributor hereby grants to You a perpetual,
74
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75
+ (except as stated in this section) patent license to make, have made,
76
+ use, offer to sell, sell, import, and otherwise transfer the Work,
77
+ where such license applies only to those patent claims licensable
78
+ by such Contributor that are necessarily infringed by their
79
+ Contribution(s) alone or by combination of their Contribution(s)
80
+ with the Work to which such Contribution(s) was submitted. If You
81
+ institute patent litigation against any entity (including a
82
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
83
+ or a Contribution incorporated within the Work constitutes direct
84
+ or contributory patent infringement, then any patent licenses
85
+ granted to You under this License for that Work shall terminate
86
+ as of the date such litigation is filed.
87
+
88
+ 4. Redistribution. You may reproduce and distribute copies of the
89
+ Work or Derivative Works thereof in any medium, with or without
90
+ modifications, and in Source or Object form, provided that You
91
+ meet the following conditions:
92
+
93
+ (a) You must give any other recipients of the Work or
94
+ Derivative Works a copy of this License; and
95
+
96
+ (b) You must cause any modified files to carry prominent notices
97
+ stating that You changed the files; and
98
+
99
+ (c) You must retain, in the Source form of any Derivative Works
100
+ that You distribute, all copyright, patent, trademark, and
101
+ attribution notices from the Source form of the Work,
102
+ excluding those notices that do not pertain to any part of
103
+ the Derivative Works; and
104
+
105
+ (d) If the Work includes a "NOTICE" text file as part of its
106
+ distribution, then any Derivative Works that You distribute must
107
+ include a readable copy of the attribution notices contained
108
+ within such NOTICE file, excluding those notices that do not
109
+ pertain to any part of the Derivative Works, in at least one
110
+ of the following places: within a NOTICE text file distributed
111
+ as part of the Derivative Works; within the Source form or
112
+ documentation, if provided along with the Derivative Works; or,
113
+ within a display generated by the Derivative Works, if and
114
+ wherever such third-party notices normally appear. The contents
115
+ of the NOTICE file are for informational purposes only and
116
+ do not modify the License. You may add Your own attribution
117
+ notices within Derivative Works that You distribute, alongside
118
+ or as an addendum to the NOTICE text from the Work, provided
119
+ that such additional attribution notices cannot be construed
120
+ as modifying the License.
121
+
122
+ You may add Your own copyright statement to Your modifications and
123
+ may provide additional or different license terms and conditions
124
+ for use, reproduction, or distribution of Your modifications, or
125
+ for any such Derivative Works as a whole, provided Your use,
126
+ reproduction, and distribution of the Work otherwise complies with
127
+ the conditions stated in this License.
128
+
129
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
130
+ any Contribution intentionally submitted for inclusion in the Work
131
+ by You to the Licensor shall be under the terms and conditions of
132
+ this License, without any additional terms or conditions.
133
+ Notwithstanding the above, nothing herein shall supersede or modify
134
+ the terms of any separate license agreement you may have executed
135
+ with Licensor regarding such Contributions.
136
+
137
+ 6. Trademarks. This License does not grant permission to use the trade
138
+ names, trademarks, service marks, or product names of the Licensor,
139
+ except as required for reasonable and customary use in describing the
140
+ origin of the Work and reproducing the content of the NOTICE file.
141
+
142
+ 7. Disclaimer of Warranty. Unless required by applicable law or
143
+ agreed to in writing, Licensor provides the Work (and each
144
+ Contributor provides its Contributions) on an "AS IS" BASIS,
145
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
146
+ implied, including, without limitation, any warranties or conditions
147
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
148
+ PARTICULAR PURPOSE. You are solely responsible for determining the
149
+ appropriateness of using or redistributing the Work and assume any
150
+ risks associated with Your exercise of permissions under this License.
151
+
152
+ 8. Limitation of Liability. In no event and under no legal theory,
153
+ whether in tort (including negligence), contract, or otherwise,
154
+ unless required by applicable law (such as deliberate and grossly
155
+ negligent acts) or agreed to in writing, shall any Contributor be
156
+ liable to You for damages, including any direct, indirect, special,
157
+ incidental, or consequential damages of any character arising as a
158
+ result of this License or out of the use or inability to use the
159
+ Work (including but not limited to damages for loss of goodwill,
160
+ work stoppage, computer failure or malfunction, or any and all
161
+ other commercial damages or losses), even if such Contributor
162
+ has been advised of the possibility of such damages.
163
+
164
+ 9. Accepting Warranty or Additional Liability. While redistributing
165
+ the Work or Derivative Works thereof, You may choose to offer,
166
+ and charge a fee for, acceptance of support, warranty, indemnity,
167
+ or other liability obligations and/or rights consistent with this
168
+ License. However, in accepting such obligations, You may act only
169
+ on Your own behalf and on Your sole responsibility, not on behalf
170
+ of any other Contributor, and only if You agree to indemnify,
171
+ defend, and hold each Contributor harmless for any liability
172
+ incurred by, or claims asserted against, such Contributor by reason
173
+ of your accepting any such warranty or additional liability.
174
+
175
+ END OF TERMS AND CONDITIONS