@p0security/cli 0.3.0
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.
- package/CONTRIBUTING.md +23 -0
- package/LICENSE.md +675 -0
- package/README.md +201 -0
- package/dist/commands/__tests__/login.test.d.ts +1 -0
- package/dist/commands/__tests__/login.test.js +75 -0
- package/dist/commands/__tests__/ls.test.d.ts +1 -0
- package/dist/commands/__tests__/ls.test.js +84 -0
- package/dist/commands/__tests__/request.test.d.ts +1 -0
- package/dist/commands/__tests__/request.test.js +94 -0
- package/dist/commands/__tests__/ssh.test.d.ts +1 -0
- package/dist/commands/__tests__/ssh.test.js +107 -0
- package/dist/commands/aws/__tests__/__input__/saml-response.d.ts +11 -0
- package/dist/commands/aws/__tests__/__input__/saml-response.js +18 -0
- package/dist/commands/aws/__tests__/__input__/sts-response.d.ts +11 -0
- package/dist/commands/aws/__tests__/__input__/sts-response.js +37 -0
- package/dist/commands/aws/__tests__/role.test.d.ts +1 -0
- package/dist/commands/aws/__tests__/role.test.js +98 -0
- package/dist/commands/aws/index.d.ts +4 -0
- package/dist/commands/aws/index.js +26 -0
- package/dist/commands/aws/role.d.ts +27 -0
- package/dist/commands/aws/role.js +123 -0
- package/dist/commands/index.d.ts +2 -0
- package/dist/commands/index.js +49 -0
- package/dist/commands/login.d.ts +14 -0
- package/dist/commands/login.js +93 -0
- package/dist/commands/ls.d.ts +4 -0
- package/dist/commands/ls.js +78 -0
- package/dist/commands/request.d.ts +12 -0
- package/dist/commands/request.js +116 -0
- package/dist/commands/ssh.d.ts +11 -0
- package/dist/commands/ssh.js +154 -0
- package/dist/common/auth/oidc.d.ts +4 -0
- package/dist/common/auth/oidc.js +18 -0
- package/dist/common/auth/server.d.ts +15 -0
- package/dist/common/auth/server.js +73 -0
- package/dist/common/fetch.d.ts +16 -0
- package/dist/common/fetch.js +39 -0
- package/dist/common/mime.d.ts +14 -0
- package/dist/common/mime.js +17 -0
- package/dist/common/xml.d.ts +21 -0
- package/dist/common/xml.js +52 -0
- package/dist/drivers/__mocks__/auth.d.ts +30 -0
- package/dist/drivers/__mocks__/auth.js +46 -0
- package/dist/drivers/api.d.ts +3 -0
- package/dist/drivers/api.js +69 -0
- package/dist/drivers/auth.d.ts +11 -0
- package/dist/drivers/auth.js +122 -0
- package/dist/drivers/env.d.ts +15 -0
- package/dist/drivers/env.js +38 -0
- package/dist/drivers/firestore.d.ts +10 -0
- package/dist/drivers/firestore.js +53 -0
- package/dist/drivers/stdio.d.ts +25 -0
- package/dist/drivers/stdio.js +44 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +23 -0
- package/dist/middlewares/version.d.ts +8 -0
- package/dist/middlewares/version.js +77 -0
- package/dist/plugins/__mocks__/login.d.ts +14 -0
- package/dist/plugins/__mocks__/login.js +24 -0
- package/dist/plugins/aws/__mocks__/assumeRole.d.ts +12 -0
- package/dist/plugins/aws/__mocks__/assumeRole.js +20 -0
- package/dist/plugins/aws/api.d.ts +12 -0
- package/dist/plugins/aws/api.js +16 -0
- package/dist/plugins/aws/assumeRole.d.ts +14 -0
- package/dist/plugins/aws/assumeRole.js +55 -0
- package/dist/plugins/aws/config.d.ts +5 -0
- package/dist/plugins/aws/config.js +38 -0
- package/dist/plugins/aws/ssm/index.d.ts +18 -0
- package/dist/plugins/aws/ssm/index.js +274 -0
- package/dist/plugins/aws/ssm/install.d.ts +7 -0
- package/dist/plugins/aws/ssm/install.js +133 -0
- package/dist/plugins/aws/types.d.ts +54 -0
- package/dist/plugins/aws/types.js +2 -0
- package/dist/plugins/google/login.d.ts +2 -0
- package/dist/plugins/google/login.js +76 -0
- package/dist/plugins/login.d.ts +13 -0
- package/dist/plugins/login.js +19 -0
- package/dist/plugins/okta/aws.d.ts +5 -0
- package/dist/plugins/okta/aws.js +42 -0
- package/dist/plugins/okta/login.d.ts +8 -0
- package/dist/plugins/okta/login.js +165 -0
- package/dist/plugins/ssh/types.d.ts +22 -0
- package/dist/plugins/ssh/types.js +2 -0
- package/dist/public/favicon.ico +0 -0
- package/dist/public/redirect-landing.html +40 -0
- package/dist/testing/firestore.d.ts +2 -0
- package/dist/testing/firestore.js +16 -0
- package/dist/testing/yargs.d.ts +12 -0
- package/dist/testing/yargs.js +23 -0
- package/dist/types/identity.d.ts +23 -0
- package/dist/types/identity.js +2 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.js +15 -0
- package/dist/types/oidc.d.ts +41 -0
- package/dist/types/oidc.js +2 -0
- package/dist/types/org.d.ts +20 -0
- package/dist/types/org.js +2 -0
- package/dist/types/request.d.ts +35 -0
- package/dist/types/request.js +20 -0
- package/dist/util.d.ts +42 -0
- package/dist/util.js +87 -0
- package/p0 +16 -0
- package/package.json +70 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Contributing to the P0 CLI
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to the P0 CLI!
|
|
4
|
+
|
|
5
|
+
## CLA
|
|
6
|
+
|
|
7
|
+
All contributors must first sign P0's contributor license agreement. This ensures
|
|
8
|
+
that your contribution is properly licensed under the CLI's open-source license
|
|
9
|
+
agreement.
|
|
10
|
+
|
|
11
|
+
Send an email to support@p0.dev, or submit a PR via a GitHub user with a valid email
|
|
12
|
+
address, and we'll hook you up.
|
|
13
|
+
|
|
14
|
+
## Guidelines
|
|
15
|
+
|
|
16
|
+
Since this project is a user-consumable command-line interface, we ask that contributions
|
|
17
|
+
follow certain guidelines, in order to ensure usability of the CLI:
|
|
18
|
+
|
|
19
|
+
- All console text not meant to be consumed by a machine should be emmitted via `console.error`
|
|
20
|
+
- Text that will be consumed by a machine, or either a machine or a human, should be emmitted
|
|
21
|
+
via `console.log`
|
|
22
|
+
- Client-usage errors (that is, errors that provide feedback to the user of expected CLI misuse)
|
|
23
|
+
should be emmitted using `throw <message>`; this prevents a stack trace from being shown
|