@cloud-copilot/iam-utils 0.0.1
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/.github/workflows/guarddog.yml +31 -0
- package/.github/workflows/pr-checks.yml +86 -0
- package/.github/workflows/release.yml +33 -0
- package/.github/workflows/update-dependencies.yml +16 -0
- package/LICENSE.txt +661 -0
- package/package.json +98 -0
- package/postbuild.sh +11 -0
- package/src/arn.test.ts +126 -0
- package/src/arn.ts +81 -0
- package/src/index.ts +7 -0
- package/src/principals.test.ts +183 -0
- package/src/principals.ts +62 -0
- package/tsconfig.cjs.json +11 -0
- package/tsconfig.esm.json +14 -0
- package/tsconfig.json +26 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: GuardDog
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
guarddog:
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
name: Scan Dependencies and Source Code
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.10'
|
|
26
|
+
|
|
27
|
+
- name: Install GuardDog
|
|
28
|
+
run: pip install guarddog
|
|
29
|
+
|
|
30
|
+
- run: guarddog npm scan src/ --exit-non-zero-on-finding
|
|
31
|
+
- run: guarddog npm verify package.json --exclude-rules empty_information --exit-non-zero-on-finding
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: 'Lint PR'
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- edited
|
|
8
|
+
- synchronize
|
|
9
|
+
- reopened
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
main:
|
|
16
|
+
name: Validate PR title
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: amannn/action-semantic-pull-request@v5
|
|
20
|
+
env:
|
|
21
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
|
|
23
|
+
lint:
|
|
24
|
+
name: Code Formatting Check
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- name: Check out the repository
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
|
+
with:
|
|
30
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
31
|
+
|
|
32
|
+
- name: Set up Node
|
|
33
|
+
uses: actions/setup-node@v4
|
|
34
|
+
with:
|
|
35
|
+
node-version: '22'
|
|
36
|
+
|
|
37
|
+
- name: Install dependencies
|
|
38
|
+
run: npm ci
|
|
39
|
+
|
|
40
|
+
- name: Check Code Formatting
|
|
41
|
+
run: npm run format-check
|
|
42
|
+
|
|
43
|
+
test:
|
|
44
|
+
name: Build and Test
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
steps:
|
|
47
|
+
- name: Check out the repository
|
|
48
|
+
uses: actions/checkout@v4
|
|
49
|
+
with:
|
|
50
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
51
|
+
|
|
52
|
+
- name: Set up Node
|
|
53
|
+
uses: actions/setup-node@v4
|
|
54
|
+
with:
|
|
55
|
+
node-version: '22'
|
|
56
|
+
|
|
57
|
+
- name: Install dependencies
|
|
58
|
+
run: npm ci
|
|
59
|
+
|
|
60
|
+
- name: Build
|
|
61
|
+
run: npm run build
|
|
62
|
+
|
|
63
|
+
- name: Check Tests
|
|
64
|
+
run: npm test
|
|
65
|
+
|
|
66
|
+
guarddog:
|
|
67
|
+
permissions:
|
|
68
|
+
contents: read
|
|
69
|
+
name: GuardDog Check
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
|
|
72
|
+
steps:
|
|
73
|
+
- name: Check out the repository
|
|
74
|
+
uses: actions/checkout@v4
|
|
75
|
+
with:
|
|
76
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
77
|
+
|
|
78
|
+
- name: Set up Python
|
|
79
|
+
uses: actions/setup-python@v5
|
|
80
|
+
with:
|
|
81
|
+
python-version: '3.10'
|
|
82
|
+
|
|
83
|
+
- name: Install GuardDog
|
|
84
|
+
run: pip install guarddog
|
|
85
|
+
|
|
86
|
+
- run: guarddog npm scan src/ --exit-non-zero-on-finding
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
release:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
issues: write
|
|
15
|
+
steps:
|
|
16
|
+
- name: Check out
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Node
|
|
20
|
+
uses: actions/setup-node@v4
|
|
21
|
+
with:
|
|
22
|
+
node-version: '22'
|
|
23
|
+
|
|
24
|
+
- name: Run semantic-release
|
|
25
|
+
env:
|
|
26
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
27
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
28
|
+
run: |
|
|
29
|
+
npm ci
|
|
30
|
+
npm run format-check
|
|
31
|
+
npm run build
|
|
32
|
+
npm run test
|
|
33
|
+
npx semantic-release
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Update Dependencies
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '0 12 * * 6' # Every Saturday at 12:00 PM UTC
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
update-dependencies:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write # Push branches
|
|
13
|
+
pull-requests: write # Create PRs
|
|
14
|
+
steps:
|
|
15
|
+
- name: Run dependency update
|
|
16
|
+
uses: cloud-copilot/update-dependencies@main
|