Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(codeql): update CodeQL ingore-paths config #205197

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

azasypkin
Copy link
Member

@azasypkin azasypkin commented Dec 27, 2024

Summary

This PR updates ignore-paths path CodeQL config to remove the paths that no longer exist and exclude other well-known test/dev-only paths.

Non-existent paths can be seen in the CodeQL logs from the most recent run:

2024-12-26T21:29:09.2376056Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-babel-plugin-package-imports, which does not exist.
2024-12-26T21:29:09.2377637Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-bazel-packages, which does not exist.
2024-12-26T21:29:09.2387717Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-package-map, which does not exist.
2024-12-26T21:29:09.2390381Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-spec-to-console, which does not exist.
2024-12-26T21:29:09.2396606Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-ts-project-linter, which does not exist.
2024-12-26T21:29:09.2402596Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-ts-project-linter-cli, which does not exist.

@azasypkin azasypkin added chore Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release labels Dec 27, 2024
@azasypkin azasypkin requested a review from a team as a code owner December 27, 2024 12:20
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

Comment on lines +91 to +93
- x-pack/platform/**/scripts
- x-pack/scripts
- x-pack/solutions/**/scripts
Copy link
Member Author

Choose a reason for hiding this comment

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

Important

These patterns are somewhat risky and might potentially include some real production code. However, the risk is very low, and the number of false positives we get from scripts is high. Let’s proceed with this approach and only make adjustments if we discover that something important is being skipped.

@azasypkin azasypkin merged commit 04ff8aa into elastic:main Dec 27, 2024
18 checks passed
@azasypkin azasypkin deleted the issue-xxx-ignore-codeql-paths branch December 27, 2024 12:58
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 7.17, 8.16, 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/12516346984

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 27, 2024
## Summary

This PR updates `ignore-paths` path CodeQL config to remove the paths
that no longer exist and exclude other well-known test/dev-only paths.

Non-existent paths can be seen in the CodeQL logs from the most recent
run:
```
2024-12-26T21:29:09.2376056Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-babel-plugin-package-imports, which does not exist.
2024-12-26T21:29:09.2377637Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-bazel-packages, which does not exist.
2024-12-26T21:29:09.2387717Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-package-map, which does not exist.
2024-12-26T21:29:09.2390381Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-spec-to-console, which does not exist.
2024-12-26T21:29:09.2396606Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-ts-project-linter, which does not exist.
2024-12-26T21:29:09.2402596Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-ts-project-linter-cli, which does not exist.
```

(cherry picked from commit 04ff8aa)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
7.17 Backport failed because of merge conflicts
8.16 Backport failed because of merge conflicts
8.17 Backport failed because of merge conflicts
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 205197

Questions ?

Please refer to the Backport tool documentation

azasypkin added a commit to azasypkin/kibana that referenced this pull request Dec 27, 2024
## Summary

This PR updates `ignore-paths` path CodeQL config to remove the paths
that no longer exist and exclude other well-known test/dev-only paths.

Non-existent paths can be seen in the CodeQL logs from the most recent
run:
```
2024-12-26T21:29:09.2376056Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-babel-plugin-package-imports, which does not exist.
2024-12-26T21:29:09.2377637Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-bazel-packages, which does not exist.
2024-12-26T21:29:09.2387717Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-package-map, which does not exist.
2024-12-26T21:29:09.2390381Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-spec-to-console, which does not exist.
2024-12-26T21:29:09.2396606Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-ts-project-linter, which does not exist.
2024-12-26T21:29:09.2402596Z [2024-12-26 21:29:09] [build-stderr] Skipping path /home/runner/work/kibana/kibana/packages/kbn-ts-project-linter-cli, which does not exist.
```

(cherry picked from commit 04ff8aa)

# Conflicts:
#	.github/codeql/codeql-config.yml
@azasypkin
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
7.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@azasypkin azasypkin added v8.18.0 v7.17.27 and removed backport:all-open Backport to all branches that could still receive a release labels Dec 27, 2024
kibanamachine added a commit that referenced this pull request Dec 27, 2024
…5197) (#205202)

# Backport

This will backport the following commits from `main` to `8.x`:
- [fix(codeql): update CodeQL `ingore-paths` config
(#205197)](#205197)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Aleh
Zasypkin","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-27T12:58:15Z","message":"fix(codeql):
update CodeQL `ingore-paths` config (#205197)\n\n## Summary\n\nThis PR
updates `ignore-paths` path CodeQL config to remove the paths\nthat no
longer exist and exclude other well-known test/dev-only
paths.\n\nNon-existent paths can be seen in the CodeQL logs from the
most recent\nrun:\n```\n2024-12-26T21:29:09.2376056Z [2024-12-26
21:29:09] [build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-babel-plugin-package-imports,
which does not exist.\n2024-12-26T21:29:09.2377637Z [2024-12-26
21:29:09] [build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-bazel-packages, which does
not exist.\n2024-12-26T21:29:09.2387717Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-package-map, which does not
exist.\n2024-12-26T21:29:09.2390381Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-spec-to-console, which does
not exist.\n2024-12-26T21:29:09.2396606Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-ts-project-linter, which
does not exist.\n2024-12-26T21:29:09.2402596Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-ts-project-linter-cli,
which does not
exist.\n```","sha":"04ff8aafe599f929710069ff75e12bfdd4d67ce2","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Security","release_note:skip","v9.0.0","backport:all-open"],"title":"fix(codeql):
update CodeQL `ingore-paths`
config","number":205197,"url":"https://github.com/elastic/kibana/pull/205197","mergeCommit":{"message":"fix(codeql):
update CodeQL `ingore-paths` config (#205197)\n\n## Summary\n\nThis PR
updates `ignore-paths` path CodeQL config to remove the paths\nthat no
longer exist and exclude other well-known test/dev-only
paths.\n\nNon-existent paths can be seen in the CodeQL logs from the
most recent\nrun:\n```\n2024-12-26T21:29:09.2376056Z [2024-12-26
21:29:09] [build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-babel-plugin-package-imports,
which does not exist.\n2024-12-26T21:29:09.2377637Z [2024-12-26
21:29:09] [build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-bazel-packages, which does
not exist.\n2024-12-26T21:29:09.2387717Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-package-map, which does not
exist.\n2024-12-26T21:29:09.2390381Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-spec-to-console, which does
not exist.\n2024-12-26T21:29:09.2396606Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-ts-project-linter, which
does not exist.\n2024-12-26T21:29:09.2402596Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-ts-project-linter-cli,
which does not
exist.\n```","sha":"04ff8aafe599f929710069ff75e12bfdd4d67ce2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205197","number":205197,"mergeCommit":{"message":"fix(codeql):
update CodeQL `ingore-paths` config (#205197)\n\n## Summary\n\nThis PR
updates `ignore-paths` path CodeQL config to remove the paths\nthat no
longer exist and exclude other well-known test/dev-only
paths.\n\nNon-existent paths can be seen in the CodeQL logs from the
most recent\nrun:\n```\n2024-12-26T21:29:09.2376056Z [2024-12-26
21:29:09] [build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-babel-plugin-package-imports,
which does not exist.\n2024-12-26T21:29:09.2377637Z [2024-12-26
21:29:09] [build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-bazel-packages, which does
not exist.\n2024-12-26T21:29:09.2387717Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-package-map, which does not
exist.\n2024-12-26T21:29:09.2390381Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-spec-to-console, which does
not exist.\n2024-12-26T21:29:09.2396606Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-ts-project-linter, which
does not exist.\n2024-12-26T21:29:09.2402596Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-ts-project-linter-cli,
which does not
exist.\n```","sha":"04ff8aafe599f929710069ff75e12bfdd4d67ce2"}}]}]
BACKPORT-->

Co-authored-by: Aleh Zasypkin <[email protected]>
azasypkin added a commit that referenced this pull request Dec 27, 2024
…05203)

# Backport

This will backport the following commits from `main` to `7.17`:
- [fix(codeql): update CodeQL `ingore-paths` config
(#205197)](#205197)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Aleh
Zasypkin","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-27T12:58:15Z","message":"fix(codeql):
update CodeQL `ingore-paths` config (#205197)\n\n## Summary\n\nThis PR
updates `ignore-paths` path CodeQL config to remove the paths\nthat no
longer exist and exclude other well-known test/dev-only
paths.\n\nNon-existent paths can be seen in the CodeQL logs from the
most recent\nrun:\n```\n2024-12-26T21:29:09.2376056Z [2024-12-26
21:29:09] [build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-babel-plugin-package-imports,
which does not exist.\n2024-12-26T21:29:09.2377637Z [2024-12-26
21:29:09] [build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-bazel-packages, which does
not exist.\n2024-12-26T21:29:09.2387717Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-package-map, which does not
exist.\n2024-12-26T21:29:09.2390381Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-spec-to-console, which does
not exist.\n2024-12-26T21:29:09.2396606Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-ts-project-linter, which
does not exist.\n2024-12-26T21:29:09.2402596Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-ts-project-linter-cli,
which does not
exist.\n```","sha":"04ff8aafe599f929710069ff75e12bfdd4d67ce2","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Security","release_note:skip","v9.0.0","backport:all-open"],"number":205197,"url":"https://github.com/elastic/kibana/pull/205197","mergeCommit":{"message":"fix(codeql):
update CodeQL `ingore-paths` config (#205197)\n\n## Summary\n\nThis PR
updates `ignore-paths` path CodeQL config to remove the paths\nthat no
longer exist and exclude other well-known test/dev-only
paths.\n\nNon-existent paths can be seen in the CodeQL logs from the
most recent\nrun:\n```\n2024-12-26T21:29:09.2376056Z [2024-12-26
21:29:09] [build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-babel-plugin-package-imports,
which does not exist.\n2024-12-26T21:29:09.2377637Z [2024-12-26
21:29:09] [build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-bazel-packages, which does
not exist.\n2024-12-26T21:29:09.2387717Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-package-map, which does not
exist.\n2024-12-26T21:29:09.2390381Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-spec-to-console, which does
not exist.\n2024-12-26T21:29:09.2396606Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-ts-project-linter, which
does not exist.\n2024-12-26T21:29:09.2402596Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-ts-project-linter-cli,
which does not
exist.\n```","sha":"04ff8aafe599f929710069ff75e12bfdd4d67ce2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205197","number":205197,"mergeCommit":{"message":"fix(codeql):
update CodeQL `ingore-paths` config (#205197)\n\n## Summary\n\nThis PR
updates `ignore-paths` path CodeQL config to remove the paths\nthat no
longer exist and exclude other well-known test/dev-only
paths.\n\nNon-existent paths can be seen in the CodeQL logs from the
most recent\nrun:\n```\n2024-12-26T21:29:09.2376056Z [2024-12-26
21:29:09] [build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-babel-plugin-package-imports,
which does not exist.\n2024-12-26T21:29:09.2377637Z [2024-12-26
21:29:09] [build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-bazel-packages, which does
not exist.\n2024-12-26T21:29:09.2387717Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-package-map, which does not
exist.\n2024-12-26T21:29:09.2390381Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-spec-to-console, which does
not exist.\n2024-12-26T21:29:09.2396606Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-ts-project-linter, which
does not exist.\n2024-12-26T21:29:09.2402596Z [2024-12-26 21:29:09]
[build-stderr] Skipping path
/home/runner/work/kibana/kibana/packages/kbn-ts-project-linter-cli,
which does not
exist.\n```","sha":"04ff8aafe599f929710069ff75e12bfdd4d67ce2"}},{"url":"https://github.com/elastic/kibana/pull/205202","number":205202,"branch":"8.x","state":"OPEN"}]}]
BACKPORT-->
@azasypkin azasypkin self-assigned this Dec 27, 2024
azasypkin added a commit that referenced this pull request Dec 28, 2024
… scans (#205227)

## Summary

Exclude `observability_solution` scripts from the CodeQL scans.

__Follow-up for:__ #205197
azasypkin added a commit that referenced this pull request Dec 28, 2024
…ly `kbn-spec-to-console` package from the CodeQL scans (#205228)

## Summary

Exclude `observability_solution` scripts and dev-only
`kbn-spec-to-console` package from the CodeQL scans.

__Follow-up for:__ #205197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.17.27 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants