AS-Revoke-Azure-AD-User-Session- Playbooks should use lower privilege #4086
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: IssueComment | |
on: | |
issues: | |
types: opened | |
env: | |
GITHUB_APPS_ID: "${{ secrets.APPLICATION_ID }}" | |
GITHUB_APPS_KEY: "${{ secrets.APPLICATION_PRIVATE_KEY }}" | |
jobs: | |
commenting: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- name: Generate a token | |
id: generate_token | |
uses: actions/create-github-app-token@46e4a501e119d39574a54e53a06c9a705efc55c9 | |
with: | |
app-id: ${{ env.GITHUB_APPS_ID }} | |
private-key: ${{ env.GITHUB_APPS_KEY }} | |
- uses: actions/github-script@b7fb2001b410c9390cbe9e2c7d5cab7eefb7b29c | |
env: | |
APPTOKEN: ${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }} | |
with: | |
github-token: ${{ env.APPTOKEN }} | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: 'Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.' | |
}); |