-
Notifications
You must be signed in to change notification settings - Fork 3
CU-869aa22g2 Add ElasticSearch bits from working_with_cogstack #123
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
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ '3.9', '3.10', '3.11', '3.12' ] | ||
max-parallel: 4 | ||
|
||
steps: | ||
- uses: actions/checkout@v5 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
- name: Check types | ||
run: | | ||
python -m mypy --follow-imports=normal *.py | ||
- name: Lint | ||
run: | | ||
ruff check *.py | ||
- name: Test | ||
run: | | ||
pytest tests |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To fix the issue, add a permissions
block specifying the least necessary privileges for the job. In this workflow, the job does not push changes, create issues, comment on pull requests, or modify repository content—it only checks out code and runs tests/linting. Therefore, limiting permissions to contents: read
at the job or workflow root is most appropriate. You can add this block either at the top (outside jobs:
) so it applies to all jobs, or directly under the types-lint-tests:
job section if you only want to affect that job. The best approach is adding to the root so that future jobs inherit safe defaults.
Edit .github/workflows/cogstack-es_main.yml
and insert the block:
permissions:
contents: read
immediately after the workflow name:
and before the on:
key.
-
Copy modified lines R2-R3
@@ -1,4 +1,6 @@ | ||
name: cogstack-es - Test | ||
permissions: | ||
contents: read | ||
|
||
on: | ||
push: |
c4172ee
to
329f047
Compare
Task linked: CU-869aa22g2 Add a separate ES-specific branch |
This PR adds only the ES parts from
working_with_cogstack
.This is based on the newer
cogstack2.py
and relevant search notebook.Currently:
cogstack.py
module