diff --git a/.changeset/dark-rings-lie.md b/.changeset/dark-rings-lie.md new file mode 100644 index 000000000000..afd8ea5d02b5 --- /dev/null +++ b/.changeset/dark-rings-lie.md @@ -0,0 +1,5 @@ +--- +"gradio": minor +--- + +feat:test semgrep ci diff --git a/.changeset/tall-impalas-reply.md b/.changeset/tall-impalas-reply.md new file mode 100644 index 000000000000..1347dc1ad550 --- /dev/null +++ b/.changeset/tall-impalas-reply.md @@ -0,0 +1,5 @@ +--- +"website": minor +--- + +feat:Use latest lite wheel on website diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 03c1c4dbe62d..69cd6e0d9016 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -1,4 +1,4 @@ -name: Semgrep +name: semgrep ci on: workflow_run: @@ -43,9 +43,7 @@ jobs: with: repository: ${{ steps.json.outputs.source_repo }} ref: ${{ steps.json.outputs.sha }} - - run: semgrep ci - env: - SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN2 }} + - run: semgrep ci --config .github/workflows/semgrep_rules.yaml update-status: permissions: actions: read diff --git a/.github/workflows/semgrep_rules.yaml b/.github/workflows/semgrep_rules.yaml new file mode 100644 index 000000000000..4eab4c635136 --- /dev/null +++ b/.github/workflows/semgrep_rules.yaml @@ -0,0 +1,18 @@ +rules: + - id: detect-os-system-calls + pattern: os.system(...) + message: "Unsafe use of os.system(). Consider using subprocess.run() instead." + languages: [python] + severity: WARNING + + - id: detect-sql-injection + pattern: 'execute("SELECT * FROM " + $TABLE)' + message: "Potential SQL injection detected. Use parameterized queries." + languages: [python] + severity: ERROR + + - id: detect-eval-usage + pattern: eval(...) + message: "Use of eval() detected. This can be dangerous if used with untrusted input." + languages: [python] + severity: ERROR diff --git a/js/_website/src/lib/components/Demos.svelte b/js/_website/src/lib/components/Demos.svelte index a1f63b74aa63..0df16036ffa3 100644 --- a/js/_website/src/lib/components/Demos.svelte +++ b/js/_website/src/lib/components/Demos.svelte @@ -1,4 +1,6 @@