-
Notifications
You must be signed in to change notification settings - Fork 223
Adding Query Validation Workflow #5514
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please sign your name here and we will add you to our approved list of contributors. |
Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please sign your name here and we will add you to our approved list of contributors. |
…in permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please sign your name here and we will add you to our approved list of contributors. |
Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please sign your name here and we will add you to our approved list of contributors. |
Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please sign your name here and we will add you to our approved list of contributors. |
Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please sign your name here and we will add you to our approved list of contributors. |
Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please sign your name here and we will add you to our approved list of contributors. |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Required for git diff detection | ||
|
||
- name: Debug filesystem | ||
if: ${{ always() }} | ||
run: | | ||
echo "Workspace contents:" | ||
ls -R | ||
echo "Scripts directory:" | ||
ls -la scripts/ | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: pip install requests pyyaml | ||
|
||
- name: Validate queries | ||
working-directory: ./scripts | ||
env: | ||
SUMO_LOGIC_ACCESS_ID: ${{ secrets.SUMO_LOGIC_ACCESS_ID }} | ||
SUMO_LOGIC_ACCESS_KEY: ${{ secrets.SUMO_LOGIC_ACCESS_KEY }} | ||
run: | | ||
python validate_queries.py |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 days ago
To fix the issue, we will add a permissions
block at the root of the workflow file. This block will specify the least privileges required for the workflow to function. Based on the workflow's actions, it only needs read access to the repository contents. Therefore, we will set contents: read
as the permission. This ensures that the workflow does not inadvertently gain unnecessary write permissions.
-
Copy modified lines R2-R3
@@ -1,2 +1,4 @@ | ||
name: Validate SumoLogic Queries | ||
permissions: | ||
contents: read | ||
on: |
Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please sign your name here and we will add you to our approved list of contributors. |
Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please sign your name here and we will add you to our approved list of contributors. |
Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please sign your name here and we will add you to our approved list of contributors. |
When correct query is added: https://github.com/SumoLogic/sumologic-documentation/actions/runs/15831172117 |
Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please sign your name here and we will add you to our approved list of contributors. |
Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please sign your name here and we will add you to our approved list of contributors. |
…ocumentation into doc_pr_validations
Moved the Content-Type header update before setting session auth in SumoLogicClient to ensure headers are set correctly. Also updated a collector example in where.md from ABC4 to ABC5.
Purpose of this pull request
DO NOT MERGE
Slack: https://sumologic.slack.com/archives/C0S86TM6K/p1750056970482669
Select the type of change
Ticket (if applicable)
DOCS-934