Skip to content

Commit

Permalink
chore: Set permissions for GitHub actions (#2072)
Browse files Browse the repository at this point in the history
Summary:
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <[email protected]>

Pull Request resolved: #2072

Reviewed By: joesus

Differential Revision: D40737684

Pulled By: jawwad

fbshipit-source-id: b0a40666855308f60714e48d49ac8ae3e4277150
  • Loading branch information
naveensrinivasan authored and facebook-github-bot committed Oct 28, 2022
1 parent d48d92a commit b0c58e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ on:
schedule:
- cron: '30 5 * * *'

permissions:
contents: read

jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
Expand Down

4 comments on commit b0c58e0

@manisimbiwi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

296136001_593907598750127_6428138750670313724_n

@manisimbiwi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshuablesi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pod 'FBSDKCoreKit', '> 8.0.0'
pod 'FBSDKLoginKit', '
> 8.0.0'
pod 'FBSDKShareKit', '> 8.0.0'
pod 'FBSDKGamingServiceKit', '
> 8.0.0'

@boymama
Copy link

@boymama boymama commented on b0c58e0 Jun 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pod 'FBSDKCoreKit', '> 8.0.0'
pod 'FBSDKLoginKit', '
> 8.0.0'
pod 'FBSDKShareKit', '> 8.0.0'
pod 'FBSDKGamingServiceKit', '
> 8.0.0'

Please sign in to comment.