[8.7] [codeql] Do not run GitHub CodeQL Action on forks (#150974) (#151098)

# Backport

This will backport the following commits from `main` to `8.7`:
- [[codeql] Do not run GitHub CodeQL Action on forks
(#150974)](https://github.com/elastic/kibana/pull/150974)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Thomas
Watson","email":"watson@elastic.co"},"sourceCommit":{"committedDate":"2023-02-14T07:44:11Z","message":"[codeql]
Do not run GitHub CodeQL Action on forks (#150974)\n\nIt turned out that
the CodeQL action also runs on forks which generate a\r\nlot of noise in
the form of security e-mails to the owners of
those\r\nforks.","sha":"da89dde7acb58d2818fa0a5327a9f03c456287c4","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","v8.8.0"],"number":150974,"url":"https://github.com/elastic/kibana/pull/150974","mergeCommit":{"message":"[codeql]
Do not run GitHub CodeQL Action on forks (#150974)\n\nIt turned out that
the CodeQL action also runs on forks which generate a\r\nlot of noise in
the form of security e-mails to the owners of
those\r\nforks.","sha":"da89dde7acb58d2818fa0a5327a9f03c456287c4"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150974","number":150974,"mergeCommit":{"message":"[codeql]
Do not run GitHub CodeQL Action on forks (#150974)\n\nIt turned out that
the CodeQL action also runs on forks which generate a\r\nlot of noise in
the form of security e-mails to the owners of
those\r\nforks.","sha":"da89dde7acb58d2818fa0a5327a9f03c456287c4"}}]}]
BACKPORT-->

Co-authored-by: Thomas Watson <watson@elastic.co>
This commit is contained in:
Kibana Machine 2023-02-14 03:03:21 -05:00 committed by GitHub
parent c90a99a65f
commit 1f065db062
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,7 @@ jobs:
actions: read
contents: read
security-events: write
if: github.repository == 'elastic/kibana' # Hack: Do not run on forks
strategy:
fail-fast: false