{"id":15647864,"url":"https://github.com/svanboxel/org-audit-action","last_synced_at":"2025-04-30T13:41:25.577Z","repository":{"id":43677145,"uuid":"243010697","full_name":"SvanBoxel/org-audit-action","owner":"SvanBoxel","description":"GitHub Action that provides an Organization Membership Audit ","archived":false,"fork":false,"pushed_at":"2023-08-30T10:55:07.000Z","size":256,"stargazers_count":42,"open_issues_count":9,"forks_count":22,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T01:49:24.300Z","etag":null,"topics":["audit","github-action","github-organization","membership","membership-query"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SvanBoxel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-25T13:48:48.000Z","updated_at":"2024-06-21T16:35:40.000Z","dependencies_parsed_at":"2024-10-03T12:21:55.295Z","dependency_job_id":"33d64801-596b-4250-b7e7-eae6666aadde","html_url":"https://github.com/SvanBoxel/org-audit-action","commit_stats":{"total_commits":57,"total_committers":9,"mean_commits":6.333333333333333,"dds":0.6666666666666667,"last_synced_commit":"2befb42d4b211522237ee4b02a4367c4c427869f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvanBoxel%2Forg-audit-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvanBoxel%2Forg-audit-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvanBoxel%2Forg-audit-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvanBoxel%2Forg-audit-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SvanBoxel","download_url":"https://codeload.github.com/SvanBoxel/org-audit-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251713223,"owners_count":21631505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audit","github-action","github-organization","membership","membership-query"],"created_at":"2024-10-03T12:21:45.069Z","updated_at":"2025-04-30T13:41:25.543Z","avatar_url":"https://github.com/SvanBoxel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Membership Audit Action\n\nGitHub Action that provides an Enterprise Account or Organization Audit of members, repositories and which permissions these members have. The output of this action is a published CSV file in the Actions tab. The user can also configure the action to publish the results to an issue.\n\nThe output looks like this running on `enterprise` mode:\n\n| enterprise | organization | repo             | user             | login      | permission |   |\n|------------|--------------|------------------|------------------|------------|------------|---|\n| goodcorp   | goodcorp-os  | node-utils       | Vitor Monteiro   | bitoiu     | ADMIN      |   |\n| goodcorp   | goodcorp-os  | node-utils       | Richard Erwin    | rerwinx    | ADMIN      |   |\n| goodcorp   | goodcorp-os  | node-utils       | Kai Hilton-Jones | evil-clone | WRITE      |   |\n| goodcorp   | core         | innersource-docs | Vitor Monteiro   | bitoiu     | ADMIN      |   |\n| goodcorp   | core         | innersource-docs | Richard Erwin    | rerwinx    | READ       |   |\n\n## Action configuration overview\n\n```yml\n - name: Membership Audit Log Action\n      uses: svanboxel/org-audit-action@master\n      with:\n        ## `organization` and `enterprise` are mutually exclusive\n        enterprise: 'goodcorp'  \n        ## repo, read:org, read:enterprise (if running with enterprise option)\n        token: ${{ secrets.TOKEN }}\n        ## issue is optional\n        issue: true\n        ## samlIdentities is optional\n        samlIdentities: true\n        ## affiliation is optional - values are 'ALL', 'DIRECT' (i.e. members only) or 'OUTSIDE' (i.e. outside collaborators only)\n        affiliation: 'ALL'\n```\n\n## Example workflows\n\nDepending on your needs you might want to trigger the audit on different events. The simplest one to test it out is to trigger the workflow on push. For this workflow to run properly you'll need to provide it with a secret personal access token from someone that is an org owner or from an application that has that privilege. Providing it a lesser scope might not show all the information for the organization.\n\n### Single org-audit audit on push (good for testing)\n\nThe action in the following workflow is configured to:\n\n- Work only on a single `organization`\n- Expose the linked SAML `nameId` field for your members if your organization is using SAML SSO and you want to retrieve this info (generally a corporate email address used to login with SSO)\n- Publish results also to an `issue`\n\n```yml\non: push\n\njobs:\n\n  audit_log:\n    runs-on: ubuntu-latest\n    name: Membership Audit Log\n\n    - name: Membership Audit Log Action\n      uses: svanboxel/org-audit-action@v1\n      with:\n        organization: 'octodemov2'\n        token: ${{ secrets.TOKEN }}\n        issue: true\n        samlIdentities: true\n```\n\n### Enterprise Account audit on a schedule (cron)\n\nThe action in the following workflow is configured to:\n\n- Work on an `enterprise` account\n- Publish results also to an `issue`\n\n```yml\non:\n  schedule:   \n    # Once a week on Saturday 00:00\n    - cron:  '0 0 * * 6'\n\njobs:\n\n  audit_log:\n    runs-on: ubuntu-latest\n    name: Membership Audit Log\n\n    - name: Membership Audit Log Action\n      uses: svanboxel/org-audit-action@v1\n      with:\n        enterprise: 'goodcorp'\n        token: ${{ secrets.TOKEN }}\n        issue: true\n```\n\n### Enterprise Audit triggered by an external service\n\nUse a [`repository_dispatch`](https://developer.github.com/v3/repos/#create-a-repository-dispatch-event) event to trigger this workflow. The action in the following workflow is configured to:\n\n- Work on an `enterprise` account\n- Publish results also to an `issue`\n\n```yml\non: repository_dispatch\n\njobs:\n\n  audit_log:\n    runs-on: ubuntu-latest\n    name: Membership Audit Log\n\n    - name: Membership Audit Log Action\n      uses: svanboxel/org-audit-action@v1\n      with:\n        enterprise: 'goodcorp'\n        token: ${{ secrets.TOKEN }}\n        issue: true\n```\n\n## Local testing\n\nYou can test this action locally by using the following command:\n\n```sh\nTOKEN=\u003cgithub_token\u003e ORGANIZATION=\u003corganization name (or use ENTERPRISE=\u003centerprise_name\u003e)\u003e GITHUB_REPOSITORY=\u003cowner\u003e/\u003crepository\u003e node src/index.js\n```\n\n## Help us improve it\n\nOpen an issue on: \u003chttps://github.com/svanboxel/org-audit-action\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvanboxel%2Forg-audit-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvanboxel%2Forg-audit-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvanboxel%2Forg-audit-action/lists"}