Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions .github/workflows/runAsimSchemaAndDataTesters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ jobs:
outputs:
approved: ${{ steps.check-approval.outputs.approved }}
steps:
- name: Checkout pull request branch
if: github.event.pull_request != null
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0

- name: Check if PR needs approval
id: check-approval
run: |
Expand Down Expand Up @@ -96,11 +104,33 @@ jobs:
echo "needs_approval=false" >> $GITHUB_OUTPUT
echo "comment_needed=false" >> $GITHUB_OUTPUT
fi

- name: Prevent fork modifications to test infrastructure
if: github.event.pull_request.head.repo.fork == true
run: |
log_info() { echo "ℹ️ $1"; }
log_error() { echo "❌ $1"; }
log_success() { echo "✅ $1"; }

log_info "Checking for modifications to asimParsersTest folder in fork PR..."

# Get the list of modified files
modified_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }})

# Check if any files in .script/tests/asimParsersTest/ have been modified
if echo "$modified_files" | grep -E "\.script/tests/asimParsersTest/" > /dev/null; then
log_error "Fork PRs cannot modify the asimParsersTest test infrastructure folder"
log_error "Modified test files detected:"
echo "$modified_files" | grep "\.script/tests/asimParsersTest/" | sed 's/^/ - /'
exit 1
fi

log_success "No modifications to asimParsersTest folder detected"

- name: Comment on fork PR for approval guidance
if: |
always() &&
github.event.pull_request.head.repo.fork == true &&
github.event.pull_request.head.repo.fork == false &&
steps.check-approval.outputs.comment_needed == 'true'
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
with:
Expand Down Expand Up @@ -419,4 +449,4 @@ jobs:
echo "Downloading script from the master: $url"
curl -o "$filePath" "$url"
# Execute the script
python "$filePath"
python "$filePath"
4 changes: 2 additions & 2 deletions .script/tests/asimParsersTest/ingestASimSampleData.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_modified_files(current_directory):
subprocess.run(git_fetch_upstream_command, shell=True, text=True, capture_output=True, check=True)
cmd = f"git diff --name-only upstream/master {current_directory}/../../../Parsers/"
try:
return subprocess.check_output(cmd, shell=True).decode().split("\n")
return subprocess.check_output(cmd, shell=True).decode().split("\n")
except subprocess.CalledProcessError as e:
print(f"::error::Error occurred while executing the command: {e}")
return []
Expand Down Expand Up @@ -455,4 +455,4 @@ def convert_data_type(schema_result, data_result):
senddtosentinel(immutable_id,data_result,stream_name,flag)
else:
print(f"Table {table_name} is not supported for log ingestion")
continue
continue
2 changes: 1 addition & 1 deletion Parsers/ASimDns/Parsers/ASimDnsAzureFirewall.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Parser:
Title: DNS activity ASIM parser for Azure Firewall
Version: '0.4.0'
LastUpdated: Dec 2, 2025
LastUpdated: Dec 3, 2025
Product:
Name: Azure Firewall
Normalization:
Expand Down
Loading