audit-labs/audit-tools

A collection of scripts, queries, and other goodies you can use in an audit. audit automation compliance evidence scripts

Commit f1bee242e1

f1bee242e112fb98a77434223b6b671a0d473b1a

parent: 224581242f

Unsigned

Christian Cleberg <156287552+ccleberg@users.noreply.github.com> · 2024-10-29 17:59 UTC
committer: <noreply@github.com>

add README to github folder

Layout: unified · split

github/README.org added +112
@@ -0,0 +1,112 @@
1#+title: GitHub Scripts
2
3*NOTE*: I used the same [[https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens][PAT]] for all scripts within this folder. Note that you can likely reduce permissions for certain scripts - it's best practice to define a PAT for a specific purpose and avoid using a single PAT with broad permissions.
4
5- Personal Access Token:
6 - [X] Repository Permissions
7 - [X] Actions: read-only
8 - [X] Contents: read-only
9 - [X] Metadata: read-only
10 - [X] Workflows: read-only
11 - [X] Organization Permissions
12 - [X] Administration: read-only
13
14* =github_admins.py=
15
16#+begin_src sh
17python ./github_admins.py
18#+end_src
19
20#+begin_src text
21Members of the organization 'your_organization':
22
23Repositories in the organization 'your_organization':
24- demo-repository
25
26Collaborators for the repository 'demo-repository':
27- user1: admin
28#+end_src
29
30* =github_audit_log.py=
31
32*NOTE*: Requires an active GitHub Enterprise subscription.
33
34#+begin_src sh
35python ./github_audit_log.py
36#+end_src
37
38#+begin_src text
39TODO: Need to get an Enterprise subscription to test this script.
40#+end_src
41
42* =github_branch_protections.py=
43
44
45#+begin_src sh
46python ./github_branch_protections.py
47#+end_src
48
49#+begin_src text
50Total branches in the repository 'demo-repository': 1
51
52Branch: main
53No protection settings
54
55Repository rulesets for 'demo-repository':
56[{'id': 2311373, 'name': 'default', 'target': 'branch', 'source_type': 'Repository', 'source': 'phryq/demo-repository', 'enforcement': 'active', 'node_id': 'RRS_lACqUmVwb3NpdG9yec40LV1PzgAjRM0', '_links': {'self': {'href': 'https://api.github.com/repos/phryq/demo-repository/rulesets/2311373'}, 'html': {'href': 'https://github.com/phryq/demo-repository/rules/2311373'}}, 'created_at': '2024-10-19T15:59:35.200-05:00', 'updated_at': '2024-10-19T15:59:35.200-05:00'}]
57#+end_src
58
59* =github_commits.py=
60
61#+begin_src sh
62python ./github_commits.py
63#+end_src
64
65#+begin_src text
66Total commits in the repository 'demo-repository' on branch 'main': 3
67
68Commit SHA: 13c488a2cdda08e4043f8ef36ced5fdd429e9718
69Author: Christian Cleberg <156287552+ccleberg@users.noreply.github.com>
70Date: 2024-10-19T20:57:55Z
71Message: Merge pull request #2 from phryq/1-test-issue
72
73fixes
74URL: https://github.com/phryq/demo-repository/commit/13c488a2cdda08e4043f8ef36ced5fdd429e9718
75Files changed:
76 - .gitignore (added)
77 Additions: 0, Deletions: 0, Changes: 0
78 - README.md (removed)
79 Additions: 0, Deletions: 4, Changes: 4
80 - README.org (added)
81 Additions: 7, Deletions: 0, Changes: 7
82
83Commit SHA: 6bfde238a2a34a93ce8ee02082eaf4ab3c189368
84Author: Christian Cleberg <hello@cleberg.net>
85Date: 2024-10-19T20:56:50Z
86Message: fixes
87URL: https://github.com/phryq/demo-repository/commit/6bfde238a2a34a93ce8ee02082eaf4ab3c189368
88Files changed:
89 - .gitignore (added)
90 Additions: 0, Deletions: 0, Changes: 0
91 - README.md (removed)
92 Additions: 0, Deletions: 4, Changes: 4
93 - README.org (added)
94 Additions: 7, Deletions: 0, Changes: 7
95
96Commit SHA: be1ddf31e08fc790f54d68f8067b7b2f3805f999
97Author: Christian Cleberg <156287552+ccleberg@users.noreply.github.com>
98Date: 2024-10-19T20:54:08Z
99Message: Initial commit
100URL: https://github.com/phryq/demo-repository/commit/be1ddf31e08fc790f54d68f8067b7b2f3805f999
101Files changed:
102 - .github/workflows/auto-assign.yml (added)
103 Additions: 19, Deletions: 0, Changes: 19
104 - .github/workflows/proof-html.yml (added)
105 Additions: 11, Deletions: 0, Changes: 11
106 - README.md (added)
107 Additions: 4, Deletions: 0, Changes: 4
108 - index.html (added)
109 Additions: 1, Deletions: 0, Changes: 1
110 - package.json (added)
111 Additions: 9, Deletions: 0, Changes: 9
112#+end_src
\ No newline at end of file