77 branches :
88 - master
99 paths :
10- - ' Parsers/ASimDns/Parsers/**'
11- - ' Parsers/ASimNetworkSession/Parsers/**'
12- - ' Parsers/ASimWebSession/Parsers/**'
13- - ' Parsers/ASimProcessEvent/Parsers/**'
14- - ' Parsers/ASimAuditEvent/Parsers/**'
15- - ' Parsers/ASimAuthentication/Parsers/**'
16- - ' Parsers/ASimFileEvent/Parsers/**'
17- - ' Parsers/ASimRegistryEvent/Parsers/**'
18- - ' Parsers/ASimUserManagement/Parsers/**'
19- - ' Parsers/ASimDhcpEvent/Parsers/**'
20- - ' Parsers/ASimAlertEvent/Parsers/**'
21- - ' Parsers/ASimAssetEntity/Parsers/**'
22-
10+ - " Parsers/ASimDns/Parsers/**"
11+ - " Parsers/ASimNetworkSession/Parsers/**"
12+ - " Parsers/ASimWebSession/Parsers/**"
13+ - " Parsers/ASimProcessEvent/Parsers/**"
14+ - " Parsers/ASimAuditEvent/Parsers/**"
15+ - " Parsers/ASimAuthentication/Parsers/**"
16+ - " Parsers/ASimFileEvent/Parsers/**"
17+ - " Parsers/ASimRegistryEvent/Parsers/**"
18+ - " Parsers/ASimUserManagement/Parsers/**"
19+ - " Parsers/ASimDhcpEvent/Parsers/**"
20+ - " Parsers/ASimAlertEvent/Parsers/**"
21+ - " Parsers/ASimAssetEntity/Parsers/**"
22+
2323 # Allows you to run this workflow manually from the Actions tab
2424 workflow_dispatch :
2525
@@ -35,7 +35,7 @@ concurrency:
3535 || format('run-{0}', github.run_id) }}
3636 cancel-in-progress : ${{ github.event.pull_request.head.repo.fork }}
3737
38- jobs :
38+ jobs :
3939 # Security gate: Fork PRs require manual approval via "SafeToRun" label
4040 # Internal PRs (same repo) can proceed without labels
4141 security-gate :
@@ -63,13 +63,13 @@ jobs:
6363 # Function to log with consistent formatting
6464 log_info() { echo "ℹ️ $1"; }
6565 log_success() { echo "✅ $1"; }
66-
66+
6767 log_info "Starting PR approval check..."
68-
68+
6969 # Check if this is a fork PR
7070 is_fork="${{ github.event.pull_request.head.repo.fork }}"
7171 log_info "Fork PR: $is_fork"
72-
72+
7373 if [ "$is_fork" = "true" ]; then
7474 log_info "FORK PR DETECTED - Proceeding with security checks"
7575
@@ -140,7 +140,7 @@ jobs:
140140 echo "$modified_files" | grep "\.script/tests/asimParsersTest/" | sed 's/^/ - /'
141141 exit 1
142142 fi
143-
143+
144144 log_success "No modifications to asimParsersTest folder detected"
145145
146146 - name : Comment on fork PR for approval guidance
@@ -156,9 +156,9 @@ jobs:
156156 const icons = { info: 'ℹ️', success: '✅', warning: '⚠️', error: '❌' };
157157 console.log(`${icons[level] || 'ℹ️'} ${message}`);
158158 };
159-
159+
160160 log('info', 'Comment step triggered for fork PR approval guidance');
161-
161+
162162 try {
163163 // Fetch existing comments
164164 const { data: comments } = await github.rest.issues.listComments({
@@ -244,46 +244,46 @@ jobs:
244244 - name : Checkout pull request branch
245245 uses : actions/checkout@v3
246246 with :
247- ref : ${{github.event.pull_request.head.sha}}
248- repository : ${{github.event.pull_request.head.repo.full_name}}
249- persist-credentials : false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
250- fetch-depth : 0 # otherwise, there would be errors pushing refs to the destination repository.
247+ ref : ${{github.event.pull_request.head.sha}}
248+ repository : ${{github.event.pull_request.head.repo.full_name}}
249+ persist-credentials : false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
250+ fetch-depth : 0 # otherwise, there would be errors pushing refs to the destination repository.
251251 - name : Setup git config
252252 run : |
253- git config --local user.name "github-actions[bot]"
254- git config --local user.email "<>"
253+ git config --local user.name "github-actions[bot]"
254+ git config --local user.email "<>"
255255 - name : Merge master into pull request branch
256256 run : |
257- git merge origin/master
258- Conflicts=$(git ls-files -u | wc -l)
259- if [ "$Conflicts" -gt 0 ] ; then
260- echo "There is a merge conflict. Aborting"
261- git merge --abort
262- exit 1
263- fi
257+ git merge origin/master
258+ Conflicts=$(git ls-files -u | wc -l)
259+ if [ "$Conflicts" -gt 0 ] ; then
260+ echo "There is a merge conflict. Aborting"
261+ git merge --abort
262+ exit 1
263+ fi
264264 - name : Set up Python
265265 uses : actions/setup-python@v2
266266 with :
267- python-version : ' 3.x'
267+ python-version : " 3.x"
268268 - name : Install dependencies
269269 run : |
270- python -m pip install --upgrade pip
271- pip install requests
272- pip install PyYAML
273- pip install tabulate
270+ python -m pip install --upgrade pip
271+ pip install requests
272+ pip install PyYAML
273+ pip install tabulate
274274 - name : Run ASim parsers template validations python script
275275 run : |
276- filePath=".script/tests/asimParsersTest/VerifyASimParserTemplate.py"
277- url="https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/.script/tests/asimParsersTest/VerifyASimParserTemplate.py"
278- # Check if file exists and delete if it does
279- if [ -f "$filePath" ]; then
280- rm -f "$filePath"
281- fi
282- # Download the file
283- echo "Downloading script from the master: $url"
284- curl -o "$filePath" "$url"
285- # Execute the script
286- python "$filePath"
276+ filePath=".script/tests/asimParsersTest/VerifyASimParserTemplate.py"
277+ url="https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/.script/tests/asimParsersTest/VerifyASimParserTemplate.py"
278+ # Check if file exists and delete if it does
279+ if [ -f "$filePath" ]; then
280+ rm -f "$filePath"
281+ fi
282+ # Download the file
283+ echo "Downloading script from the master: $url"
284+ curl -o "$filePath" "$url"
285+ # Execute the script
286+ python "$filePath"
287287 Run-ASim-Sample-Data-Ingest :
288288 needs : Run-ASim-TemplateValidation
289289 name : Run ASim Sample Data Ingestion
@@ -295,56 +295,56 @@ jobs:
295295 - name : Checkout pull request branch
296296 uses : actions/checkout@v4
297297 with :
298- ref : ${{github.event.pull_request.head.sha}}
299- repository : ${{github.event.pull_request.head.repo.full_name}}
300- persist-credentials : false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
301- fetch-depth : 0 # otherwise, there would be errors pushing refs to the destination repository.
298+ ref : ${{github.event.pull_request.head.sha}}
299+ repository : ${{github.event.pull_request.head.repo.full_name}}
300+ persist-credentials : false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
301+ fetch-depth : 0 # otherwise, there would be errors pushing refs to the destination repository.
302302 - name : Setup git config
303303 run : |
304- git config --local user.name "github-actions[bot]"
305- git config --local user.email "<>"
304+ git config --local user.name "github-actions[bot]"
305+ git config --local user.email "<>"
306306 - name : Merge master into pull request branch
307307 run : |
308- git merge origin/master
309- Conflicts=$(git ls-files -u | wc -l)
310- if [ "$Conflicts" -gt 0 ] ; then
311- echo "There is a merge conflict. Aborting"
312- git merge --abort
313- exit 1
314- fi
308+ git merge origin/master
309+ Conflicts=$(git ls-files -u | wc -l)
310+ if [ "$Conflicts" -gt 0 ] ; then
311+ echo "There is a merge conflict. Aborting"
312+ git merge --abort
313+ exit 1
314+ fi
315315 - name : Set up Python
316316 uses : actions/setup-python@v5
317317 with :
318- python-version : ' 3.x'
318+ python-version : " 3.x"
319319 - name : Install dependencies
320320 run : |
321- python -m pip install --upgrade pip
322- pip install azure-identity
323- pip install requests
324- pip install PyYAML
325- pip install azure-monitor-ingestion
326- pip install azure-core
321+ python -m pip install --upgrade pip
322+ pip install azure-identity
323+ pip install requests
324+ pip install PyYAML
325+ pip install azure-monitor-ingestion
326+ pip install azure-core
327327 - name : Login to Azure Public Cloud
328- uses : azure/login@v2
328+ uses : azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5
329329 with :
330330 client-id : ${{ secrets.AZURE_ASIM_CLIENT_ID }}
331331 tenant-id : ${{ secrets.AZURE_TENANT_ID }}
332332 allow-no-subscriptions : true
333333 - name : Asim Sample Log Ingestion
334334 id : Ingestlogs
335335 run : |
336- filePath=".script/tests/asimParsersTest/ingestASimSampleData.py"
337- url="https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/.script/tests/asimParsersTest/ingestASimSampleData.py"
338- # Check if file exists and delete if it does
339- if [ -f "$filePath" ]; then
340- rm -f "$filePath"
341- fi
342- # Download the file
343- echo "Downloading script from the master: $url"
344- curl -o "$filePath" "$url"
345- chmod +x "$filePath"
346- # Execute the script
347- python "$filePath" "${{ github.event.pull_request.number }}"
336+ filePath=".script/tests/asimParsersTest/ingestASimSampleData.py"
337+ url="https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/.script/tests/asimParsersTest/ingestASimSampleData.py"
338+ # Check if file exists and delete if it does
339+ if [ -f "$filePath" ]; then
340+ rm -f "$filePath"
341+ fi
342+ # Download the file
343+ echo "Downloading script from the master: $url"
344+ curl -o "$filePath" "$url"
345+ chmod +x "$filePath"
346+ # Execute the script
347+ python "$filePath" "${{ github.event.pull_request.number }}"
348348 Run-ASim-Schema-Data-tests :
349349 needs : Run-ASim-Sample-Data-Ingest
350350 name : Run ASim Schema and Data tests
@@ -360,9 +360,9 @@ jobs:
360360 repository : ${{ github.event.pull_request.head.repo.full_name }}
361361 persist-credentials : false
362362 fetch-depth : 0 # otherwise, there would be errors pushing refs to the destination repository.
363-
363+
364364 - name : Login to Azure Public Cloud with AzPowershell
365- uses : azure/login@v2
365+ uses : azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5
366366 with :
367367 client-id : ${{ secrets.AZURE_ASIM_CLIENT_ID }}
368368 tenant-id : ${{ secrets.AZURE_TENANT_ID }}
@@ -384,7 +384,7 @@ jobs:
384384 exit 1
385385 fi
386386 - name : Run ASIM Schema and Data tests PowerShell script
387- uses : azure/powershell@v2
387+ uses : azure/powershell@53dd145408794f7e80f97cfcca04155c85234709
388388 with :
389389 inlineScript : |
390390 $filePath = ".script/tests/asimParsersTest/runAsimTesters.ps1"
@@ -426,8 +426,8 @@ jobs:
426426 fetch-depth : 0 # otherwise, there would be errors pushing refs to the destination repository.
427427 - name : Setup git config
428428 run : |
429- git config --local user.name "github-actions[bot]"
430- git config --local user.email "<>"
429+ git config --local user.name "github-actions[bot]"
430+ git config --local user.email "<>"
431431 - name : Merge master into pull request branch
432432 run : |
433433 git merge origin/master
@@ -440,15 +440,15 @@ jobs:
440440 - name : Setup Python
441441 uses : actions/setup-python@v2
442442 with :
443- python-version : ' 3.x'
443+ python-version : " 3.x"
444444 - name : Install dependencies
445445 run : |
446- python -m pip install --upgrade pip
447- pip install PyYAML
448- pip install azure-identity
449- pip install azure-monitor-query
446+ python -m pip install --upgrade pip
447+ pip install PyYAML
448+ pip install azure-identity
449+ pip install azure-monitor-query
450450 - name : Login to Azure Public Cloud
451- uses : azure/login@v2
451+ uses : azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5
452452 with :
453453 client-id : ${{ secrets.AZURE_ASIM_CLIENT_ID }}
454454 tenant-id : ${{ secrets.AZURE_TENANT_ID }}
0 commit comments