github-security-report 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,318 @@
1
+ Metadata-Version: 2.4
2
+ Name: github-security-report
3
+ Version: 0.1.0
4
+ Summary: Security and quality reporting across GitHub organisations
5
+ Project-URL: Homepage, https://github.com/lfreleng-actions/github-security-report-action
6
+ Project-URL: Repository, https://github.com/lfreleng-actions/github-security-report-action
7
+ Project-URL: Issues, https://github.com/lfreleng-actions/github-security-report-action/issues
8
+ Author-email: The Linux Foundation <mwatkins@linuxfoundation.org>
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ Keywords: codeql,dependabot,github,github-actions,linux-foundation,reporting,scorecard,secret-scanning,security,zizmor
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Topic :: Security
24
+ Classifier: Topic :: Software Development :: Quality Assurance
25
+ Classifier: Typing :: Typed
26
+ Requires-Python: >=3.10
27
+ Requires-Dist: httpx[http2]==0.28.1
28
+ Requires-Dist: jinja2==3.1.6
29
+ Requires-Dist: jsonschema==4.26.0
30
+ Requires-Dist: pyyaml==6.0.3
31
+ Requires-Dist: rich==15.0.0
32
+ Requires-Dist: typer==0.26.7
33
+ Provides-Extra: dev
34
+ Requires-Dist: mypy==2.1.0; extra == 'dev'
35
+ Requires-Dist: pytest-asyncio==1.4.0; extra == 'dev'
36
+ Requires-Dist: pytest-cov==7.1.0; extra == 'dev'
37
+ Requires-Dist: pytest==9.0.3; extra == 'dev'
38
+ Requires-Dist: respx==0.23.1; extra == 'dev'
39
+ Requires-Dist: ruff==0.15.16; extra == 'dev'
40
+ Requires-Dist: syrupy==5.3.2; extra == 'dev'
41
+ Requires-Dist: types-jsonschema==4.26.0.20260518; extra == 'dev'
42
+ Requires-Dist: types-pyyaml==6.0.12.20250915; extra == 'dev'
43
+ Description-Content-Type: text/markdown
44
+
45
+ <!--
46
+ # SPDX-License-Identifier: Apache-2.0
47
+ # SPDX-FileCopyrightText: 2026 The Linux Foundation
48
+ -->
49
+
50
+ # 🔐 GitHub Security Report
51
+
52
+ <!-- prettier-ignore-start -->
53
+ <!-- markdownlint-disable-next-line MD013 -->
54
+ [![Linux Foundation](https://img.shields.io/badge/Linux-Foundation-blue)](https://linuxfoundation.org/) [![Source Code](https://img.shields.io/badge/GitHub-100000?logo=github&logoColor=white&color=blue)](https://github.com/lfreleng-actions/github-security-report-action) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
55
+ <!-- prettier-ignore-end -->
56
+
57
+ > Security and quality **reporting** (not scanning) across GitHub
58
+ > organisations. Aggregates existing signals — CodeQL, OpenSSF Scorecard,
59
+ > zizmor, Dependabot, and secret scanning — and ranks the worst offenders so
60
+ > remediation effort goes where it is needed.
61
+
62
+ ## 🗒️ Published reports
63
+
64
+ <https://lfreleng-actions.github.io/github-security-report-action/>
65
+
66
+ ## What it does
67
+
68
+ For each in-scope repository, every signal is classified into one of four
69
+ states and rendered worst-first:
70
+
71
+ - **Offenders** — enabled with open findings (a ranked table row).
72
+ - **Clean** — enabled with zero findings (a count beneath the table).
73
+ - **Not enabled** — supported but switched off (a nag list prompting you to
74
+ enable it).
75
+ - **Unknown** — indeterminate (insufficient permission), footnoted separately.
76
+
77
+ The single GitHub code-scanning feed is partitioned by `tool.name` into CodeQL,
78
+ Scorecard, and zizmor; Scorecard prefers the external aggregate score and falls
79
+ back to code-scanning findings. See [`docs/BRIEF.md`](docs/BRIEF.md) and
80
+ [`docs/phase0-findings.md`](docs/phase0-findings.md) for the full design and the
81
+ API research it is built on.
82
+
83
+ Two further sections report **configuration posture** and **freshness** as plain
84
+ tables (org mode):
85
+
86
+ - **Dependabot** — three tables: repositories with vulnerability **alerts not
87
+ enabled**, repositories with **security updates not enabled**, and ecosystems
88
+ with no update `cooldown` configured (mandatory; any value passes).
89
+ - **Releases / Tagging** — repositories overdue a release or tag, ranked by a
90
+ hidden compound staleness score. Repositories younger than
91
+ `release_min_age_days` (default 28; `0` includes all) and those in
92
+ `releases_exclude` are omitted.
93
+
94
+ ## Operating modes
95
+
96
+ | Mode | Token | Scope | Output |
97
+ | ---- | ----- | ----- | ------ |
98
+ | `org` | fine-grained PAT (single org) or classic PAT (multiple orgs) | one or more organisations | GitHub Pages + Slack + terminal |
99
+ | `repo` | `GITHUB_TOKEN` | the current repository only | job summary + outputs + optional PR gate |
100
+
101
+ `scope: auto` resolves to org mode when configuration is supplied, otherwise
102
+ repo mode for the detected repository. The ephemeral `GITHUB_TOKEN` cannot read
103
+ org-wide security data, so org mode requires a PAT — see
104
+ [Token permissions](#token-permissions) for the exact scopes.
105
+
106
+ ## Token permissions
107
+
108
+ Repo mode needs nothing beyond the workflow's ephemeral `GITHUB_TOKEN`. Org mode
109
+ needs a Personal Access Token; choose **one** of the two options below depending
110
+ on how many organisations the report covers.
111
+
112
+ All required access is **read-only**. The tool degrades any read it is not
113
+ permitted to make to an "unknown" status rather than reporting a repository as
114
+ clean, so an under-scoped token surfaces as unknowns in the report instead of
115
+ silently wrong results — start minimal and widen if you see unknowns.
116
+
117
+ ### Single organisation — fine-grained PAT
118
+
119
+ A fine-grained PAT is bound to one resource owner, so it works for a report
120
+ covering a **single** organisation. Create it with **Resource owner** set to the
121
+ organisation and **Repository access** set to *All repositories*, then grant:
122
+
123
+ **Repository permissions** (all Read-only):
124
+
125
+ | Permission | Used for |
126
+ | ---------- | -------- |
127
+ | Metadata | Mandatory baseline; listing organisation repositories |
128
+ | Contents | `.github/dependabot.yml`, latest release, and tag dates |
129
+ | Dependabot alerts | Open Dependabot vulnerability alerts |
130
+ | Code scanning alerts | CodeQL / Scorecard / zizmor findings |
131
+ | Secret scanning alerts | Open secret-scanning alerts |
132
+ | Administration | Dependabot enablement + security-updates status, and effective branch rules |
133
+
134
+ **Organization permissions** (Read-only):
135
+
136
+ | Permission | Used for |
137
+ | ---------- | -------- |
138
+ | Administration | Organisation rulesets (detect tools enabled via a required workflow) |
139
+
140
+ > A fine-grained token cannot span organisations. For a report covering more
141
+ > than one org, use a classic PAT (below).
142
+
143
+ ### Multiple organisations — classic PAT
144
+
145
+ A classic PAT is authorised across every organisation its creator can access
146
+ (subject to SSO authorisation), so a single token can report on **multiple**
147
+ organisations. Grant these scopes:
148
+
149
+ | Scope | Used for |
150
+ | ----- | -------- |
151
+ | `repo` | Repository data, including private repositories |
152
+ | `security_events` | Code scanning, secret scanning, and Dependabot alerts (org-bulk and per-repo) |
153
+ | `read:org` | Listing organisation repositories and reading organisation rulesets |
154
+
155
+ > For organisations that enforce SSO, the PAT must be **SSO-authorised** for
156
+ > each target organisation, or the org-level endpoints return `403` (reported as
157
+ > unknown). Store the token as a secret (e.g. `SECURITY_REPORT_PAT`) and
158
+ > reference it by env-var name via `token_env`; never embed it in the config.
159
+
160
+ ## Usage
161
+
162
+ ### Org mode (scheduled report)
163
+
164
+ ```yaml
165
+ - name: "Security report"
166
+ id: report
167
+ uses: lfreleng-actions/github-security-report-action@v0.1.0
168
+ with:
169
+ scope: "org"
170
+ config: "${{ secrets.GSR_CONFIG || vars.GSR_CONFIG }}"
171
+ token: "${{ secrets.SECURITY_REPORT_PAT }}"
172
+ output_dir: "site"
173
+ pages_url: "https://lfreleng-actions.github.io/github-security-report-action/"
174
+ ```
175
+
176
+ A ready-to-use scheduled workflow lives in
177
+ [`.github/workflows/reporting.yaml`](.github/workflows/reporting.yaml): it runs
178
+ daily at 09:00 UTC, publishes to GitHub Pages every day, and posts a Slack
179
+ digest only on the configured `report_day` (default Tuesday).
180
+
181
+ ### Repo mode (PR gate)
182
+
183
+ ```yaml
184
+ - name: "Security report"
185
+ uses: lfreleng-actions/github-security-report-action@v0.1.0
186
+ with:
187
+ scope: "repo"
188
+ token: "${{ github.token }}"
189
+ fail_threshold: "high" # fail the job on any open high/critical finding
190
+ # requires: permissions: { security-events: read }
191
+ ```
192
+
193
+ ## Configuration
194
+
195
+ Configuration is JSON, supplied as a plain `vars.` entry or base64-encoded in a
196
+ `secrets.` entry (base64 only to stop JSON braces tripping GitHub's log
197
+ redaction — it is encoding, not encryption). Tokens are referenced by
198
+ environment-variable name, never embedded.
199
+
200
+ ```json
201
+ {
202
+ "slack": { "channel": "releng-scm", "report_day": "tuesday" },
203
+ "report": {
204
+ "top_n": 10,
205
+ "top_n_report": 10,
206
+ "top_n_cli": 10,
207
+ "top_n_slack": 10,
208
+ "include_archived": false,
209
+ "include_test": false,
210
+ "release_min_age_days": 28
211
+ },
212
+ "organizations": [
213
+ {
214
+ "name": "lfreleng-actions",
215
+ "token_env": "GITHUB_TOKEN",
216
+ "exclude": ["actions-template"],
217
+ "releases_exclude": ["internal-only-repo"]
218
+ }
219
+ ]
220
+ }
221
+ ```
222
+
223
+ `report_day` accepts a single weekday, a list of weekdays, `"never"`, or
224
+ `"always"`.
225
+
226
+ `top_n` controls how many offenders are shown per signal. It is the shared
227
+ default for all three outputs; set any of `top_n_report` (GitHub Pages),
228
+ `top_n_cli` (terminal), or `top_n_slack` (Slack digest) to override an
229
+ individual output. Each can also be set at the CLI with `--top-n`,
230
+ `--top-n-report`, `--top-n-cli`, and `--top-n-slack`.
231
+
232
+ `report.release_min_age_days` (default `28`, `0` = include all) and the per-org
233
+ `releases_exclude` tune the Releases / Tagging section; they can be overridden
234
+ locally with `--release-min-age-days` and the repeatable `--releases-exclude`.
235
+
236
+ The per-org `exclude` list removes repositories from analysis entirely; they are
237
+ reported as **excluded** (distinct from "not enabled"), so an intentional
238
+ exclusion is visible rather than silently dropped.
239
+
240
+ `slack.channel` is optional. The action's `slack_channel` input (wired to the
241
+ `SLACK_CHANNEL_ID` variable in `reporting.yaml`) overrides it, so the channel
242
+ can live as an org/repo variable rather than in the config JSON. It must be the
243
+ channel **ID** (`C0…`), not the name.
244
+
245
+ ### Config file location
246
+
247
+ For local use you can drop the same JSON at a conventional per-user path and run
248
+ with no flags — it is picked up automatically when no `--config`,
249
+ `--config-data`, or `--org` is given (instead of erroring):
250
+
251
+ ```text
252
+ $XDG_CONFIG_HOME/github-security-report/config.json
253
+ # or, when XDG_CONFIG_HOME is unset:
254
+ ~/.config/github-security-report/config.json
255
+ ```
256
+
257
+ An explicit `--config`, `--config-data`, or `--org` always takes precedence, and
258
+ the action itself never reads this path (it is supplied configuration directly).
259
+ Secrets stay out of the file: reference the token by environment-variable name
260
+ via `token_env` (e.g. `SECURITY_REPORT_PAT`, exported in your shell or sourced
261
+ from a secrets file) — the channel ID is the only Slack value the file holds,
262
+ and the Slack **bot token** is consumed by the workflow, not the CLI.
263
+
264
+ ## Inputs
265
+
266
+ <!-- markdownlint-disable MD013 -->
267
+
268
+ | Name | Required | Default | Description |
269
+ | ---- | -------- | ------- | ----------- |
270
+ | `scope` | No | `auto` | `auto`, `org`, or `repo` |
271
+ | `config` | No | — | JSON config (raw or base64) |
272
+ | `org` | No | — | Single organisation (shorthand for org mode) |
273
+ | `repo` | No | detected | `owner/name` for repo mode |
274
+ | `token` | No | `${{ github.token }}` | PAT (org mode) or `GITHUB_TOKEN` (repo mode) |
275
+ | `token_env` | No | `GITHUB_TOKEN` | Env var name the tool reads the token from |
276
+ | `output_dir` | No | — | Directory for Pages output (org mode) |
277
+ | `pages_url` | No | — | Published Pages URL (used in the Slack link) |
278
+ | `slack_channel` | No | — | Slack channel ID; overrides the config `slack.channel` (e.g. the `SLACK_CHANNEL_ID` variable) |
279
+ | `top_n` | No | `10` | Offenders per signal across all outputs (shared default) |
280
+ | `top_n_report` | No | — | Offenders per signal in the GitHub Pages output (overrides `top_n`) |
281
+ | `top_n_cli` | No | — | Offenders per signal in the terminal output (overrides `top_n`) |
282
+ | `top_n_slack` | No | — | Offenders per signal in the Slack digest (overrides `top_n`) |
283
+ | `fail_threshold` | No | `none` | `none`/`low`/`medium`/`high`/`critical`/`any` (repo mode) |
284
+ | `force_notify` | No | `false` | Post to Slack regardless of `report_day` |
285
+ | `tool_version` | No | `0.1.0` | Published PyPI version (ignored on pull requests) |
286
+ | `use_local_source` | No | `false` | Run from the checked-out source instead of PyPI (for testing unreleased code from any event) |
287
+
288
+ <!-- markdownlint-enable MD013 -->
289
+
290
+ ## Outputs
291
+
292
+ | Name | Description |
293
+ | ---- | ----------- |
294
+ | `should_notify` | Whether today is a Slack notification day |
295
+ | `slack_payload` | Prebuilt Slack `chat.postMessage` payload (JSON) |
296
+ | `failed` | Whether the repo-mode fail threshold was met |
297
+
298
+ ## Running locally
299
+
300
+ The tool is published to PyPI and runs with `uvx`. Inside a Git checkout with a
301
+ `GITHUB_TOKEN` exported, it auto-detects the repository (preferring the
302
+ `upstream` remote, then `origin`) and prints a Rich table report:
303
+
304
+ ```bash
305
+ export GITHUB_TOKEN=ghp_your_token
306
+ uvx github-security-report report
307
+
308
+ # Or org mode locally with a PAT:
309
+ uvx github-security-report report --org lfreleng-actions
310
+ ```
311
+
312
+ ## Development
313
+
314
+ ```bash
315
+ uv sync --extra dev
316
+ uv run pytest
317
+ uv run ruff check src/ tests/
318
+ ```
@@ -0,0 +1,28 @@
1
+ github_security_report/__init__.py,sha256=WkTV1u4ErwZNXgEsngWNAyvtvuSj2QDMXQ2WCjFAjK4,459
2
+ github_security_report/_version.py,sha256=n_5vdJsPNu7wZ57LGuRL585uvll-hiuvZUBWzdG0RQU,520
3
+ github_security_report/classify.py,sha256=W4XJnk1aqhobhnA_5jfDT9ehZQf4c5IbRvvmBRSRKow,10155
4
+ github_security_report/cli.py,sha256=4RGAYmF_osR_9Bi9B_PKBe4cIegWdtjxTpfKZBDI2Oo,19413
5
+ github_security_report/client.py,sha256=vd7Dk5AeYFb7Due3Zk4856HfgzXv8QUBTdRtV1DwuyM,21573
6
+ github_security_report/collect.py,sha256=2PyceG6cylfKFoNwFdeWI3FADI7ID0M1FCq6W4_ZJQ4,15343
7
+ github_security_report/config.py,sha256=xiBXLnAnr7S6xk5COakrGNGxKdI_BswtTDvGnJaLOjQ,12096
8
+ github_security_report/gitctx.py,sha256=LUqVT0s1TlLcvQBvSWyss4TLbQW5ZQb2KN-Hblunrmw,2146
9
+ github_security_report/models.py,sha256=4nUmgsSds33u28oyOmukdoxj1Uzl8LJGzRXGNwIxcUw,5367
10
+ github_security_report/posture.py,sha256=XVMjkC_n6A09M4VnMLss2T6fCR5DiUaqypmCOQz13TA,9719
11
+ github_security_report/py.typed,sha256=8AkVlIO-WJ6ehRAt6sfsojYu_5YFMRy28xwDjT12VUE,71
12
+ github_security_report/report.py,sha256=kSzHUaiNFkrjwy1IXfq5IYTdaBi94suKHPD6aotkbrQ,6044
13
+ github_security_report/rulesets.py,sha256=T0Bij2L-0I7drK7_R91zdQiAiQ_Rbc62jvwgnU1WQbM,4879
14
+ github_security_report/runner.py,sha256=S0jrd52yqqqO6zqqcYdcw7dHNujsvarmCTq5_LNm_uo,4853
15
+ github_security_report/scope.py,sha256=tCKAJwU6sz_GHqVjY8lrYw6GzIxajla15CMlOqA-qjM,3153
16
+ github_security_report/severity.py,sha256=iXnxQL25966Qw68lTvaamVgZNaouhJCDg46T1ZfQNDw,2568
17
+ github_security_report/render/__init__.py,sha256=0Sbooia5Nk-Nr9DCzL1p_9HTKGXsiv3XcTCtQBN8CRU,157
18
+ github_security_report/render/html.py,sha256=6JCazVNDseNOCmNyZ5c3AcGUC4PeTG62GCZQokDpmcM,5339
19
+ github_security_report/render/markdown.py,sha256=3-V8EjoCBtVG16KAqYrgVTIP9fUHJeUq1ZkjIdXR3ko,6323
20
+ github_security_report/render/slack.py,sha256=ZXjDqWw4E_bMktXhrPrjQiHoRss3fs3JqfdBJsY1vC8,7878
21
+ github_security_report/render/terminal.py,sha256=eFeipVK6FriomtufLY_kYBUNXhKmND5b1QF36E70F8w,6345
22
+ github_security_report/templates/index.html.j2,sha256=9BaEhHTOhSyFU84IzywHqS_nLX7Yt_T3E_MZss3DlQo,2583
23
+ github_security_report/templates/report.html.j2,sha256=-kPlIVr8JsVMv9VpRrArvajO0OJeCfsU34Z2PtfkmJk,7475
24
+ github_security_report-0.1.0.dist-info/METADATA,sha256=qrloEewM5d3BoW9F3F5FogK9WfeNnRFaaz6ZmXxuhl8,13548
25
+ github_security_report-0.1.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
26
+ github_security_report-0.1.0.dist-info/entry_points.txt,sha256=0B8UXNPrq7y0XkHVlxhA7lBMv_aA5OycZrnpwhX9xTk,74
27
+ github_security_report-0.1.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
28
+ github_security_report-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.30.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ github-security-report = github_security_report.cli:app
@@ -0,0 +1,201 @@
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
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.