Set permissions for GitHub actions
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: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									0729261b62
								
							
						
					
					
						commit
						02eb6126a4
					
				
							
								
								
									
										6
									
								
								.github/workflows/invalid_question.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/invalid_question.yml
									
									
									
									
										vendored
									
									
								
							@ -3,8 +3,14 @@ on:
 | 
				
			|||||||
  schedule:
 | 
					  schedule:
 | 
				
			||||||
  - cron: "*/10 * * * *"
 | 
					  - cron: "*/10 * * * *"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					permissions:
 | 
				
			||||||
 | 
					  contents: read
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  stale:
 | 
					  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
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    env:
 | 
					    env:
 | 
				
			||||||
      ACTIONS_STEP_DEBUG: true
 | 
					      ACTIONS_STEP_DEBUG: true
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										6
									
								
								.github/workflows/missing_playground.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/missing_playground.yml
									
									
									
									
										vendored
									
									
								
							@ -3,8 +3,14 @@ on:
 | 
				
			|||||||
  schedule:
 | 
					  schedule:
 | 
				
			||||||
  - cron: "*/10 * * * *"
 | 
					  - cron: "*/10 * * * *"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					permissions:
 | 
				
			||||||
 | 
					  contents: read
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  stale:
 | 
					  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
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    env:
 | 
					    env:
 | 
				
			||||||
      ACTIONS_STEP_DEBUG: true
 | 
					      ACTIONS_STEP_DEBUG: true
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										6
									
								
								.github/workflows/stale.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/stale.yml
									
									
									
									
										vendored
									
									
								
							@ -3,8 +3,14 @@ on:
 | 
				
			|||||||
  schedule:
 | 
					  schedule:
 | 
				
			||||||
  - cron: "0 2 * * *"
 | 
					  - cron: "0 2 * * *"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					permissions:
 | 
				
			||||||
 | 
					  contents: read
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  stale:
 | 
					  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
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    env:
 | 
					    env:
 | 
				
			||||||
      ACTIONS_STEP_DEBUG: true
 | 
					      ACTIONS_STEP_DEBUG: true
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								.github/workflows/tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/tests.yml
									
									
									
									
										vendored
									
									
								
							@ -8,6 +8,9 @@ on:
 | 
				
			|||||||
    branches-ignore:
 | 
					    branches-ignore:
 | 
				
			||||||
      - 'gh-pages'
 | 
					      - 'gh-pages'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					permissions:
 | 
				
			||||||
 | 
					  contents: read
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  # Label of the container job
 | 
					  # Label of the container job
 | 
				
			||||||
  sqlite:
 | 
					  sqlite:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user