Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/actions/install_requirements/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ runs:
using: composite
steps:
- name: Get version of python
# nosemgrep
run: |
PYTHON_VERSION="${{ inputs.python-version }}"
if [ $PYTHON_VERSION == "dev" ]; then
Expand All @@ -27,7 +28,7 @@ runs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install packages
run: pip install ${{ inputs.pip-install }}
run: pip install ${{ inputs.pip-install }} # nosemgrep
shell: bash

- name: Report what was installed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
uses: ./.github/actions/install_requirements

- name: Run tox
run: tox -e ${{ inputs.tox }}
run: tox -e ${{ inputs.tox }} # nosemgrep
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,15 @@ repos:
entry: ruff format --force-exclude
types: [python]
require_serial: true


- repo: https://github.com/semgrep/pre-commit
rev: v1.144.0
hooks:
- id: semgrep
# Use Semgrep's "default" ruleset and fail the commit on findings
args:
- --config
- p/default
- --error
- --skip-unknown-extensions
2 changes: 1 addition & 1 deletion src/fastcs/transports/rest/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def attr_put(request):
await attribute.put(cast_from_rest_type(attribute.datatype, request.value))

# Fast api uses type annotations for validation, schema, conversions
attr_put.__annotations__["request"] = _put_request_body(attribute)
attr_put.__annotations__["request"] = _put_request_body(attribute) # nosemgrep

return attr_put

Expand Down
6 changes: 6 additions & 0 deletions tests/benchmarking/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ services:
image: registry.gitlab.com/tango-controls/docker/mysql:5
environment:
- MYSQL_ROOT_PASSWORD=root
security_opt:
- "no-new-privileges:true"
read_only: true

tango-cs:
hostname: localhost
Expand All @@ -20,3 +23,6 @@ services:
- MYSQL_DATABASE=tango
depends_on:
- mysql
security_opt:
- "no-new-privileges:true"
read_only: true