Skip to content

Commit

Permalink
Merge branch 'main' into 5.0-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
abidlabs authored Oct 5, 2024
2 parents 098a009 + ed8be90 commit 8bcbd3f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/dark-rings-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gradio": minor
---

feat:test semgrep ci
5 changes: 5 additions & 0 deletions .changeset/tall-impalas-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"website": minor
---

feat:Use latest lite wheel on website
6 changes: 2 additions & 4 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Semgrep
name: semgrep ci

on:
workflow_run:
Expand Down Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/semgrep_rules.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions js/_website/src/lib/components/Demos.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script lang="ts">
import WHEEL from "$lib/json/wheel.json";
export let name: string;
export let code: string;
export let highlighted_code: string;
Expand Down

0 comments on commit 8bcbd3f

Please sign in to comment.