Skip to content

Commit bb003c3

Browse files
authored
Merge pull request #6 from Timwood0x10/improve
updae v0.1.5
2 parents 437430c + a5f6881 commit bb003c3

136 files changed

Lines changed: 19829 additions & 5138 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ jobs:
3737
- name: Install LLVM
3838
run: |
3939
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
40-
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main"
40+
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-22 main"
4141
sudo apt-get update
42-
sudo apt-get install -y llvm-21-dev clang-21 libclang-21-dev
43-
echo "/usr/lib/llvm-21/bin" >> $GITHUB_PATH
42+
sudo apt-get install -y llvm-22-dev clang-22 libclang-22-dev
43+
echo "/usr/lib/llvm-22/bin" >> $GITHUB_PATH
4444
4545
- name: Lint & Format Check
4646
run: make fmt
@@ -74,10 +74,10 @@ jobs:
7474
- name: Install LLVM
7575
run: |
7676
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
77-
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main"
77+
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-22 main"
7878
sudo apt-get update
79-
sudo apt-get install -y llvm-21-dev clang-21 libclang-21-dev
80-
echo "/usr/lib/llvm-21/bin" >> $GITHUB_PATH
79+
sudo apt-get install -y llvm-22-dev clang-22 libclang-22-dev
80+
echo "/usr/lib/llvm-22/bin" >> $GITHUB_PATH
8181
8282
- name: Build
8383
run: make build
@@ -125,7 +125,7 @@ jobs:
125125
echo "$HOME/.zvm/self" >> $GITHUB_PATH
126126
127127
- name: Install LLVM
128-
run: brew install llvm@21 && echo "$(brew --prefix llvm@21)/bin" >> $GITHUB_PATH
128+
run: brew install llvm@22 && echo "$(brew --prefix llvm@22)/bin" >> $GITHUB_PATH
129129

130130
- name: Build
131131
run: make build
@@ -223,10 +223,10 @@ jobs:
223223
- name: Install LLVM
224224
run: |
225225
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
226-
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main"
226+
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-22 main"
227227
sudo apt-get update
228-
sudo apt-get install -y llvm-21-dev clang-21 libclang-21-dev
229-
echo "/usr/lib/llvm-21/bin" >> $GITHUB_PATH
228+
sudo apt-get install -y llvm-22-dev clang-22 libclang-22-dev
229+
echo "/usr/lib/llvm-22/bin" >> $GITHUB_PATH
230230
231231
- name: Build
232232
run: make build
@@ -267,7 +267,7 @@ jobs:
267267
echo "$HOME/.zvm/self" >> $GITHUB_PATH
268268
269269
- name: Install LLVM
270-
run: brew install llvm@21 && echo "$(brew --prefix llvm@21)/bin" >> $GITHUB_PATH
270+
run: brew install llvm@22 && echo "$(brew --prefix llvm@22)/bin" >> $GITHUB_PATH
271271

272272
- name: Build
273273
run: make build

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ jobs:
4747
- name: Install LLVM
4848
run: |
4949
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
50-
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main"
50+
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-22 main"
5151
sudo apt-get update
52-
sudo apt-get install -y llvm-21-dev clang-21 libclang-21-dev
53-
echo "/usr/lib/llvm-21/bin" >> $GITHUB_PATH
52+
sudo apt-get install -y llvm-22-dev clang-22 libclang-22-dev
53+
echo "/usr/lib/llvm-22/bin" >> $GITHUB_PATH
5454
5555
- name: Build Release
5656
run: make build
@@ -86,7 +86,7 @@ jobs:
8686
echo "$HOME/.zvm/self" >> $GITHUB_PATH
8787
8888
- name: Install LLVM
89-
run: brew install llvm@21 && echo "$(brew --prefix llvm@21)/bin" >> $GITHUB_PATH
89+
run: brew install llvm@22 && echo "$(brew --prefix llvm@22)/bin" >> $GITHUB_PATH
9090

9191
- name: Build Release
9292
run: make build

.github/workflows/security-analysis.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
fail_on_critical:
1515
description: 'Fail build on critical issues'
1616
required: false
17-
default: 'true'
17+
default: true
1818
type: boolean
1919

2020
jobs:
@@ -30,9 +30,9 @@ jobs:
3030
uses: actions/checkout@v4
3131

3232
- name: Setup Zig
33-
uses: mlugg/setup-zig@v1
33+
uses: mlugg/setup-zig@v2
3434
with:
35-
zig-version: 0.15.0
35+
version: "0.15.0"
3636

3737
- name: Build OmniScope
3838
run: |
@@ -52,14 +52,11 @@ jobs:
5252
if [ -d "examples" ]; then
5353
echo "Running OmniScope analysis on examples..."
5454
55-
# Find LLVM IR files
56-
find examples -name "*.bc" -o -name "*.ll" > /tmp/ir_files.txt || true
57-
58-
if [ -s /tmp/ir_files.txt ]; then
59-
./zig-out/bin/OmniSope \
55+
# Find LLVM IR files and process safely with null-delimiter
56+
if find examples -name "*.bc" -print0 2>/dev/null | grep -qz .; then
57+
find examples \( -name "*.bc" -o -name "*.ll" \) -print0 | xargs -0 ./zig-out/bin/OmniScope \
6058
--output-format sarif \
61-
--output-file analysis-output/results.sarif \
62-
$(cat /tmp/ir_files.txt) 2>/dev/null || echo "Analysis completed with warnings"
59+
--output-file analysis-output/results.sarif || echo "Analysis completed with warnings"
6360
else
6461
echo "No LLVM IR files found, creating empty SARIF"
6562
echo '{"version":"2.1.0","$schema":"https://json.schemastore.org/sarif-2.1.0.json","runs":[{"tool":{"driver":{"name":"OmniScope","version":"0.1.0","informationUri":"https://github.com/omniscope/omniscope"}},"results":[]}]}' > analysis-output/results.sarif
@@ -93,7 +90,7 @@ jobs:
9390
echo "Warnings: $WARNING"
9491
9592
# Fail if critical issues found and fail_on_critical is true
96-
FAIL_ON_CRITICAL="${{ github.event.inputs.fail_on_critical || 'true' }}"
93+
FAIL_ON_CRITICAL="${{ github.event.inputs.fail_on_critical || true }}"
9794
if [ "$FAIL_ON_CRITICAL" = "true" ] && [ "$CRITICAL" -gt 0 ]; then
9895
echo "::error::Found $CRITICAL critical security issues!"
9996
exit 1
@@ -126,9 +123,9 @@ jobs:
126123
uses: actions/checkout@v4
127124

128125
- name: Setup Zig
129-
uses: mlugg/setup-zig@v1
126+
uses: mlugg/setup-zig@v2
130127
with:
131-
zig-version: 0.15.0
128+
version: "0.15.0"
132129

133130
- name: Build and test
134131
run: |

0 commit comments

Comments
 (0)