preflight-cli 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.
preflight/ui.py ADDED
@@ -0,0 +1,301 @@
1
+ """Terminal presentation for the CLI.
2
+
3
+ Everything the user reads goes to stderr; the only thing on stdout is output
4
+ they might pipe somewhere, so `preflight scan -m cost --print > role.yaml`
5
+ produces a clean file.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from collections.abc import Collection, Mapping, Sequence
11
+
12
+ from rich.console import Console
13
+ from rich.padding import Padding
14
+ from rich.panel import Panel
15
+ from rich.prompt import Confirm, Prompt
16
+ from rich.syntax import Syntax
17
+ from rich.table import Table
18
+ from rich.text import Text
19
+
20
+ from preflight import __version__
21
+ from preflight.modules import Module, ModuleStatus
22
+
23
+ #: Chrome, prompts, errors.
24
+ console = Console(stderr=True, highlight=False)
25
+
26
+ #: Pipeable output only.
27
+ payload = Console()
28
+
29
+ BANNER = r"""
30
+ ___ ___ ___ ___ _ ___ ___ _ _ _____
31
+ | _ \| _ \| __|| __|| | |_ _| / __|| || ||_ _|
32
+ | _/| /| _| | _| | |__ | | | (_ || __ | | |
33
+ |_| |_|_\|___||_| |____||___| \___||_||_| |_|
34
+ """
35
+
36
+ TAGLINE = "read-only AWS audit"
37
+
38
+
39
+ def print_banner() -> None:
40
+ """Short wordmark and version, on stderr."""
41
+ console.print(Text(BANNER.strip("\n"), style="bold cyan"))
42
+ console.print(
43
+ f"[dim] {TAGLINE} · v{__version__} · by[/dim] [cyan]Jet1[/cyan]\n",
44
+ highlight=False,
45
+ )
46
+
47
+
48
+ def clear_screen() -> None:
49
+ """Wipe the terminal and leave the wordmark at the top.
50
+
51
+ One step to a screen, so the thing being asked about is the only thing on
52
+ it. Does nothing useful when output isn't a terminal (a pipe, or the test
53
+ runner), so the escape codes are skipped there.
54
+ """
55
+ if console.is_terminal:
56
+ console.clear()
57
+ print_banner()
58
+
59
+
60
+ def _indented(markup: str) -> Padding:
61
+ """Markup indented so wrapped lines line up with the first one."""
62
+ return Padding(Text.from_markup(markup), (0, 0, 0, 2))
63
+
64
+
65
+ def print_step(number: int, total: int, title: str) -> None:
66
+ console.print(f"[cyan]┌──[/cyan] [bold]Step {number} of {total}[/bold] · {title}")
67
+ console.print("[cyan]└──────────────────────────────────────[/cyan]\n")
68
+
69
+
70
+ def modules_table(modules: Sequence[Module]) -> Table:
71
+ """The module picker, numbered for the modules that can run today."""
72
+ table = Table(
73
+ box=None,
74
+ pad_edge=False,
75
+ padding=(0, 2, 0, 0),
76
+ header_style="dim",
77
+ )
78
+ table.add_column("#", justify="right", width=2)
79
+ table.add_column("Module", style="bold", no_wrap=True)
80
+ table.add_column("Looks for")
81
+ table.add_column("Actions", justify="right")
82
+ table.add_column("Status", no_wrap=True)
83
+
84
+ for choice, module in enumerate((m for m in modules if m.is_available), start=1):
85
+ number = Text(str(choice), style="cyan")
86
+ status = Text(ModuleStatus.AVAILABLE.label, style="green")
87
+ actions = Text(str(len(module.iam_actions)))
88
+ table.add_row(number, Text(module.name), Text(module.summary), actions, status)
89
+ return table
90
+
91
+
92
+ def print_modules(modules: Sequence[Module]) -> None:
93
+ console.print(modules_table(modules))
94
+ coming_soon = [module.name for module in modules if not module.is_available]
95
+ if coming_soon:
96
+ console.print(f"\n[dim] + coming soon: {', '.join(coming_soon)}[/dim]")
97
+ console.print()
98
+
99
+
100
+ #: Built as `Text`, not markup: `[x]` in a markup string reads as a style tag.
101
+ CHECKED = Text("[x]", style="bold green")
102
+ UNCHECKED = Text("[ ]", style="dim")
103
+
104
+
105
+ #: The label of the row that leaves the picker, drawn under the services.
106
+ CONTINUE_ROW = "Continue"
107
+
108
+
109
+ def permissions_table(
110
+ groups: Mapping[str, Sequence[str]],
111
+ picked: Collection[str],
112
+ *,
113
+ cursor: int | None = None,
114
+ ) -> Table:
115
+ """The permission picker: one checkbox per AWS service.
116
+
117
+ `cursor` is the index of the highlighted row when the arrow-key picker is
118
+ driving — `len(groups)` being the Continue row below the services. Left as
119
+ `None` the same table doubles as the read-only summary and the numbered
120
+ fallback for terminals we can't read keypresses from.
121
+ """
122
+ table = Table(
123
+ box=None,
124
+ pad_edge=False,
125
+ padding=(0, 2, 0, 0),
126
+ header_style="dim",
127
+ show_header=cursor is None,
128
+ )
129
+ table.add_column(" ", width=1)
130
+ table.add_column(" ", width=3)
131
+ table.add_column("#", justify="right", width=2)
132
+ table.add_column("Service", style="bold", no_wrap=True)
133
+ table.add_column("Actions", justify="right")
134
+ table.add_column("Reads", overflow="fold")
135
+
136
+ for index, (service, actions) in enumerate(groups.items()):
137
+ on = service in picked
138
+ here = index == cursor
139
+ verbs = ", ".join(sorted({action.split(":", 1)[1] for action in actions}))
140
+ table.add_row(
141
+ Text(">" if here else " ", style="bold cyan"),
142
+ CHECKED if on else UNCHECKED,
143
+ Text(str(index + 1), style="cyan"),
144
+ Text(service, style=_row_style(on, here)),
145
+ Text(str(len(actions)), style="" if on else "dim"),
146
+ Text(verbs, style="dim" if on else "dim italic"),
147
+ )
148
+
149
+ if cursor is not None:
150
+ at_end = cursor == len(groups)
151
+ table.add_row(
152
+ Text(">" if at_end else " ", style="bold cyan"),
153
+ Text(""),
154
+ Text(""),
155
+ Text(CONTINUE_ROW, style="bold cyan" if at_end else "dim"),
156
+ Text(""),
157
+ Text("done picking, go to the next step", style="dim"),
158
+ )
159
+ return table
160
+
161
+
162
+ def _row_style(on: bool, here: bool) -> str:
163
+ if here:
164
+ return "bold cyan"
165
+ return "bold" if on else "dim"
166
+
167
+
168
+ def print_permissions(
169
+ groups: Mapping[str, Sequence[str]],
170
+ picked: Collection[str],
171
+ *,
172
+ always: Sequence[str] = (),
173
+ cursor: int | None = None,
174
+ keys: str | None = None,
175
+ ) -> None:
176
+ """Draw the picker, the locked-in actions, and (when asking) how to drive it."""
177
+ console.print(permissions_table(groups, picked, cursor=cursor))
178
+ console.print()
179
+ if always:
180
+ console.print(_indented(f"[dim]Always included: {', '.join(always)}[/dim]"))
181
+ total = sum(len(groups[service]) for service in groups if service in picked) + len(always)
182
+ console.print(
183
+ _indented(
184
+ f"[dim]{len(picked)} of {len(groups)} services · "
185
+ f"{total} read-only action{'' if total == 1 else 's'} in the role[/dim]\n"
186
+ )
187
+ )
188
+ if keys:
189
+ console.print(_indented(f"[dim]{keys}[/dim]"))
190
+ console.print()
191
+
192
+
193
+ def print_checking(modules: Sequence[Module]) -> None:
194
+ """One line naming what step 1 settled on, above the permission picker."""
195
+ names = ", ".join(module.name for module in modules)
196
+ console.print(f" [dim]Checking:[/dim] [bold]{names}[/bold]\n")
197
+
198
+
199
+ def print_selection(modules: Sequence[Module], actions: Sequence[str]) -> None:
200
+ """Confirm what was selected and what permissions that implies."""
201
+ names = ", ".join(module.name for module in modules)
202
+ services = sorted({action.split(":", 1)[0] for action in actions})
203
+ console.print(_indented(f"[bold]{names}[/bold]"))
204
+ console.print(
205
+ _indented(
206
+ f"[bold]{len(actions)}[/bold] read-only actions "
207
+ f"across [bold]{len(services)}[/bold] services: "
208
+ f"[dim]{', '.join(services)}[/dim]"
209
+ )
210
+ )
211
+ console.print(
212
+ _indented("[dim]Get, List and Describe only. No write actions, no wildcards.[/dim]\n")
213
+ )
214
+
215
+
216
+ def ask(
217
+ question: str,
218
+ *,
219
+ default: str | None = None,
220
+ choices: list[str] | None = None,
221
+ show_default: bool = True,
222
+ ) -> str:
223
+ """Ask on stderr and read the answer from stdin.
224
+
225
+ Rich prints the prompt to `console` and then reads with a bare `input()`,
226
+ which is what keeps the question off stdout. Raises `EOFError` when
227
+ there's nobody there to answer.
228
+ """
229
+ return Prompt.ask(
230
+ question,
231
+ console=console,
232
+ default=default,
233
+ choices=choices,
234
+ show_choices=bool(choices),
235
+ show_default=show_default,
236
+ )
237
+
238
+
239
+ def confirm(question: str) -> bool:
240
+ return Confirm.ask(question, console=console, default=False)
241
+
242
+
243
+ def emit_template(text: str) -> None:
244
+ """Write the template to stdout — highlighted for a terminal, raw for a pipe."""
245
+ if payload.is_terminal:
246
+ payload.print(Syntax(text, "yaml", background_color="default", word_wrap=False))
247
+ else:
248
+ payload.file.write(text)
249
+ payload.file.flush()
250
+
251
+
252
+ def print_save_hint(default_path: str) -> None:
253
+ """Tell the user what pressing Enter will do before they're asked."""
254
+ console.print(
255
+ _indented(
256
+ "[dim]Enter a path to save the role template, or press "
257
+ f"[/dim][bold]Enter[/bold][dim] for ./{default_path} in the "
258
+ "directory you ran this from.[/dim]\n"
259
+ )
260
+ )
261
+
262
+
263
+ def print_saved(path: str, actions: Sequence[str]) -> None:
264
+ console.print(
265
+ Panel(
266
+ Text.assemble(
267
+ ("✓ ", "bold green"),
268
+ ("Saved the read-only role template\n", "bold"),
269
+ (path, "bold cyan"),
270
+ (f" · {len(actions)} read-only actions", "dim"),
271
+ ),
272
+ border_style="green",
273
+ padding=(0, 2),
274
+ expand=False,
275
+ )
276
+ )
277
+ console.print()
278
+
279
+
280
+ def print_next_steps(path: str) -> None:
281
+ console.print(" [bold]Next[/bold]")
282
+ console.print(
283
+ f" [cyan]1.[/cyan] Read it. It's yours, and it's meant to be audited.\n"
284
+ f" [cyan]2.[/cyan] Deploy [bold]{path}[/bold] from the CloudFormation console, or:\n"
285
+ f" [dim]aws cloudformation deploy --template-file {path} \\\n"
286
+ " --stack-name preflight-role --capabilities CAPABILITY_NAMED_IAM \\\n"
287
+ " --parameter-overrides TrustedPrincipalArn=<the-arn-you-run-as>[/dim]\n"
288
+ " [cyan]3.[/cyan] Copy the [bold]RoleArn[/bold] output from the finished stack."
289
+ )
290
+ console.print(
291
+ "\n [dim]The checks themselves aren't wired up yet. This release sets up the "
292
+ "permissions they'll run under.[/dim]"
293
+ )
294
+
295
+
296
+ def print_error(message: str) -> None:
297
+ console.print(f"[red]✗[/red] {message}")
298
+
299
+
300
+ def print_hint(message: str) -> None:
301
+ console.print(f"[dim] {message}[/dim]")
@@ -0,0 +1,107 @@
1
+ Metadata-Version: 2.5
2
+ Name: preflight-cli
3
+ Version: 0.1.0
4
+ Summary: Free, open-source, read-only AWS audit CLI. Find the first three things to fix in deploys, cost, and bus factor.
5
+ Project-URL: Homepage, https://github.com/jetonecloud/preflight
6
+ Project-URL: Issues, https://github.com/jetonecloud/preflight/issues
7
+ Project-URL: Security, https://github.com/jetonecloud/preflight/blob/main/SECURITY.md
8
+ Author-email: Jet1 <hello@jetonecloud.com>
9
+ License: Apache-2.0
10
+ License-File: LICENSE
11
+ License-File: NOTICE
12
+ Keywords: audit,aws,cost-optimization,devops,security
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: System :: Systems Administration
19
+ Requires-Python: >=3.11
20
+ Requires-Dist: boto3>=1.34
21
+ Requires-Dist: click>=8.2
22
+ Requires-Dist: jinja2>=3.1
23
+ Requires-Dist: rich>=13.7
24
+ Requires-Dist: typer>=0.12
25
+ Provides-Extra: dev
26
+ Requires-Dist: moto[all]>=5.0; extra == 'dev'
27
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
28
+ Requires-Dist: pytest>=8.0; extra == 'dev'
29
+ Requires-Dist: pyyaml>=6.0; extra == 'dev'
30
+ Requires-Dist: ruff>=0.6; extra == 'dev'
31
+ Description-Content-Type: text/markdown
32
+
33
+ # Preflight
34
+
35
+ Preflight is a command-line tool that audits your AWS account and tells you what's worth fixing. It looks at how you deploy, what you're spending, and how much of your infrastructure depends on one or two people, then writes up a report you can share with the rest of your team.
36
+
37
+ It's read-only and open source (Apache-2.0), and it runs on your own machine. Your AWS credentials stay there.
38
+
39
+ We're [Jet1](https://jetonecloud.com), a managed DevOps team for startups that haven't hired a DevOps engineer yet. Preflight is the audit we run on every first call, packaged so you can run it yourself.
40
+
41
+ ## Getting started
42
+
43
+ Install it:
44
+
45
+ ```sh
46
+ curl -fsSL https://jetonecloud.com/preflight | sh
47
+ ```
48
+
49
+ You can also install it with `pipx`, `brew`, or Docker (see [`docs/installation.md`](docs/installation.md)). If you don't have the AWS CLI set up locally, you can [run it from AWS CloudShell](docs/cloudshell.md) instead.
50
+
51
+ To see what a report looks like before pointing it at your account:
52
+
53
+ ```sh
54
+ preflight demo
55
+ ```
56
+
57
+ When you're ready to scan for real:
58
+
59
+ 1. Pick what you want checked and generate the role it needs:
60
+
61
+ ```sh
62
+ preflight scan --modules cost --save
63
+ ```
64
+
65
+ Run `preflight scan` on its own and it'll ask instead: first which checks to run, then which permissions to grant them. Every service the checks need starts selected, and you can switch any of them off with the arrow keys — `--services ec2,rds` does the same thing without the questions. Either way you get a CloudFormation template granting only the read-only actions those checks declare — nothing for the modules you didn't pick. This step makes no AWS calls and needs no credentials, so you can read the whole template before anything touches your account. ([`iam/role.cfn.yaml`](iam/role.cfn.yaml) is the same thing with every module selected.)
66
+
67
+ 2. Deploy the template from the CloudFormation console, or with `aws cloudformation deploy`. The stack's `RoleArn` output is what you pass back to Preflight.
68
+ 3. Log in to AWS the way you usually do (`aws sso login`, a named profile, and so on). Preflight won't ask you for access keys.
69
+ 4. Run the scan with the role ARN from the stack's outputs:
70
+
71
+ ```sh
72
+ preflight scan --role-arn arn:aws:iam::123456789012:role/PreflightReadOnlyRole --region us-east-1
73
+ ```
74
+
75
+ Before it starts, Preflight lists what it's going to read. When it's done, you'll have an HTML report and a JSON export saved locally.
76
+
77
+ If you'd rather not create the role, you can scan with an existing profile:
78
+
79
+ ```sh
80
+ preflight scan --profile my-profile --region us-east-1
81
+ ```
82
+
83
+ Preflight checks whether that identity has write or admin access and will warn you if it does. We'd still recommend the dedicated role.
84
+
85
+ ## Permissions and your data
86
+
87
+ The IAM policy in [`iam/policy.json`](iam/policy.json) only uses `Get`, `List`, and `Describe` actions, with no wildcards. Each module declares the actions it needs, so the role Preflight generates covers the checks you picked and nothing else — `preflight scan --list-modules` shows what each one asks for, and the permission picker lets you cut it down further by service. Nothing with a write verb or a wildcard can reach a generated policy; Preflight refuses to emit one.
88
+
89
+ Preflight uses the standard AWS credential chain (profiles, SSO, STS, assume-role). It never handles your keys directly and never sends credentials anywhere.
90
+
91
+ By default, nothing leaves your machine. The one exception is opt-in: you can ask us to email you a copy of the report. If you do, Preflight sends a summary of scores and findings over HTTPS, optionally with account IDs and resource names redacted, after you confirm your email address with a magic link. Run `preflight preview` first to see exactly what would be sent. Raw API responses are never sent or stored.
92
+
93
+ The dollar figures in the report are estimates. We keep them on the conservative side, and each one shows how it was worked out.
94
+
95
+ Releases are signed and come with checksums, so you can verify what you're running. [`SECURITY.md`](SECURITY.md) has the full details on data handling and our threat model.
96
+
97
+ ## Contributing
98
+
99
+ Contributions are welcome. Have a look at [`CONTRIBUTING.md`](CONTRIBUTING.md) and our [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) first.
100
+
101
+ ## License
102
+
103
+ Apache License 2.0, see [`LICENSE`](LICENSE). Some of the check logic is adapted from other Apache-2.0 and MIT-licensed projects, and they're credited in [`NOTICE`](NOTICE).
104
+
105
+ ## Want help fixing what it finds?
106
+
107
+ That's what we do at [Jet1](https://jetonecloud.com): deploys, AWS infrastructure, cost work, and on-call, with an SLA, and you own everything we build. If you'd like to talk it through with an engineer, [book a 20-minute call](https://jetonecloud.com/book).
@@ -0,0 +1,18 @@
1
+ preflight/__init__.py,sha256=kUR5RAFc7HCeiqdlX36dZOHkUI5wI6V_43RpEcD8b-0,22
2
+ preflight/cli.py,sha256=fN280BfPv6dz2dxCoS2RHSDVaWCIQ8qpFZoBWAbHhdw,15452
3
+ preflight/keys.py,sha256=cT0pDd3QHAHx8-2BB-Jx4J_VRg_4JyCFu2hpOFBIYw4,3115
4
+ preflight/ui.py,sha256=SMMOWWIKGU9gdK8H0Ecerq-VGF57kLH9diseUPC8LJQ,10504
5
+ preflight/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ preflight/core/cfn.py,sha256=kWLawuhoPWqzC3cJ64h0V2zTKnlpQlBoDwpQ3z41CJM,3446
7
+ preflight/core/iam.py,sha256=lUCZXdZqDCogztoNBd_6uSXfyMK8x5rEs-uAYfqVNCI,4011
8
+ preflight/modules/__init__.py,sha256=7-ok5m6kxkjGyqeZKcb0N7UfXijrHZwJTcAFoR9vaKQ,2483
9
+ preflight/modules/base.py,sha256=izEM0PnXgudoqKkZBIy2xRUqpynan_2VXadJXonQfgU,2205
10
+ preflight/modules/cost.py,sha256=iSz6zSbb595T0fe2U-3AK2E7jJJ6e0BRcjeYeB-aGAc,1219
11
+ preflight/modules/planned.py,sha256=EVSCHGikjrngW_KT7QiDeLICSeZ_dQS008qyXQW-9gw,3420
12
+ preflight/templates/role.cfn.yaml.j2,sha256=6m4uZhh4FEB4hCbFfJqCHxQNn74OfxvAqMPByJNAu74,2843
13
+ preflight_cli-0.1.0.dist-info/METADATA,sha256=GBPYEr0X4Sks9hcl7omSyRpymcOcMVhtDaEKOpPEU8Q,6030
14
+ preflight_cli-0.1.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
15
+ preflight_cli-0.1.0.dist-info/entry_points.txt,sha256=S_-wdk64Q6iNFZmUkzZHsZnjdxu9GBMVdicWn_zXr60,48
16
+ preflight_cli-0.1.0.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
17
+ preflight_cli-0.1.0.dist-info/licenses/NOTICE,sha256=nL9y0E7qrNB2MgFbfH119tCa_jvuupQqnwzqws5ew4Q,799
18
+ preflight_cli-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.4
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ preflight = preflight.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.
@@ -0,0 +1,18 @@
1
+ Preflight
2
+ Copyright 2026 Jet1 (jetonecloud.com)
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ This project's check logic may, where license terms permit, be informed by or
11
+ adapted from other open-source AWS auditing tools, including but not limited to:
12
+
13
+ - Prowler (Apache-2.0) — https://github.com/prowler-cloud/prowler
14
+ - Kulshan / MissionFinOps (Apache-2.0) — https://github.com/MissionFinOps/kulshan
15
+
16
+ Any such adaptation will be recorded here with the specific file, source project,
17
+ and license at the time it is incorporated. No GPL or AGPL licensed code is
18
+ knowingly incorporated into this repository.