From 12297255a76b1b89bc73ccc68a342d4d83396411 Mon Sep 17 00:00:00 2001 From: Shigure Kurosaki Date: Thu, 19 Dec 2024 07:21:37 +0800 Subject: [PATCH] feat: Add pr-audit.yml, add the missing name field to the audit.yml file (#96) * feat: Add pr-audit.yml, add the missing name field to the audit.yml file * fix: unable to find version latest * fix: No ast-grep project configuration is found * fix: No such file or directory * fix: init assertion failed --- .github/workflows/audit.yml | 1 + .github/workflows/pr-audit.yml | 15 +++++++++++++++ Cargo.lock | 4 ++-- rule-tests/.gitkeep | 0 rules/.gitkeep | 0 sgconfig.yml | 6 ++++++ utils/.gitkeep | 0 7 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pr-audit.yml create mode 100644 rule-tests/.gitkeep create mode 100644 rules/.gitkeep create mode 100644 sgconfig.yml create mode 100644 utils/.gitkeep diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 181b719..1eaf18a 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -10,6 +10,7 @@ on: jobs: cargo-deny: runs-on: ubuntu-latest + name: Run cargo deny steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/pr-audit.yml b/.github/workflows/pr-audit.yml new file mode 100644 index 0000000..118d43c --- /dev/null +++ b/.github/workflows/pr-audit.yml @@ -0,0 +1,15 @@ +name: Pull Request Security Audit + +on: + pull_request: + branches: [ 'canary' ] + +jobs: + sg-lint: + runs-on: ubuntu-latest + name: Run ast-grep lint + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: ast-grep lint + uses: ast-grep/action@v1.5.0 diff --git a/Cargo.lock b/Cargo.lock index dc79edc..a5a0aed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -863,9 +863,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", ] diff --git a/rule-tests/.gitkeep b/rule-tests/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/rules/.gitkeep b/rules/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/sgconfig.yml b/sgconfig.yml new file mode 100644 index 0000000..e416dae --- /dev/null +++ b/sgconfig.yml @@ -0,0 +1,6 @@ +ruleDirs: + - rules +testConfigs: + - testDir: rule-tests +utilDirs: + - utils diff --git a/utils/.gitkeep b/utils/.gitkeep new file mode 100644 index 0000000..e69de29