Skip to content

Commit 9bf321e

Browse files
committed
Merge branch 'master' into pr/13148
2 parents a0723de + b81b464 commit 9bf321e

File tree

1,446 files changed

+115288
-13403
lines changed

Some content is hidden

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

1,446 files changed

+115288
-13403
lines changed

.github/workflows/arm-ttk-validations.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2222
with:
23-
fetch-depth: 0
23+
fetch-depth: 10
2424
- shell: pwsh
2525
id: step1
2626
name: Identify Changes in PR

.github/workflows/codeql-analysis.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'javascript', 'python', 'ruby', 'actions' ]
35+
language: [ 'javascript', 'python', 'ruby', 'actions', 'csharp' ]
3636
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'actions' ]
3737
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3838

@@ -51,6 +51,16 @@ jobs:
5151
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5252
queries: security-extended,security-and-quality
5353

54+
# ℹ️ Setup DotNet Versions to building C# projects
55+
- name: Setup DotNet Versions
56+
uses: actions/setup-dotnet@v5
57+
with:
58+
dotnet-version: |
59+
6.0.x
60+
7.0.x
61+
8.0.x
62+
9.0.x
63+
5464
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5565
# If this step fails, then you should remove it and run the build manually (see below)
5666
- name: Autobuild

.github/workflows/hyperlinkValidator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
env:
2929
GeneratedToken: ${{ steps.generate_token.outputs.token }}
3030
with:
31-
fetch-depth: 0
31+
fetch-depth: 10
3232
token: ${{ env.GeneratedToken }}
3333
- shell: pwsh
3434
id: step1

.github/workflows/slash-command-armttk.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
if: steps.get-pr.outputs.is_fork == 'false'
4747
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4848
with:
49-
fetch-depth: 0
49+
fetch-depth: 10
5050
ref: ${{ steps.get-pr.outputs.head_sha }}
5151
persist-credentials: false
5252
- shell: pwsh
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Update Solutions Analyzer CSV Files
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'Solutions/**/*.json'
9+
- 'Solutions/**/Parsers/**/*.yaml'
10+
- 'Solutions/**/Parsers/**/*.yml'
11+
- 'Tools/Solutions Analyzer/solution_connector_tables.py'
12+
workflow_dispatch: # Allow manual trigger
13+
schedule:
14+
# Run weekly on Monday at 2 AM UTC to catch any missed changes
15+
- cron: '0 2 * * 1'
16+
17+
jobs:
18+
update-csv:
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
pull-requests: write
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: '3.11'
34+
35+
- name: Install dependencies
36+
run: |
37+
pip install json5
38+
39+
- name: Run Solutions Analyzer
40+
run: |
41+
cd "Tools/Solutions Analyzer"
42+
python solution_connector_tables.py
43+
44+
- name: Generate Connector Documentation
45+
run: |
46+
cd "Tools/Solutions Analyzer"
47+
python generate_connector_docs.py
48+
49+
- name: Check for changes
50+
id: check_changes
51+
run: |
52+
if git diff --quiet "Tools/Solutions Analyzer/solutions_connectors_tables_mapping.csv" "Tools/Solutions Analyzer/solutions_connectors_tables_issues_and_exceptions_report.csv" "Tools/Solutions Analyzer/connector-docs/"; then
53+
echo "changed=false" >> $GITHUB_OUTPUT
54+
else
55+
echo "changed=true" >> $GITHUB_OUTPUT
56+
fi
57+
58+
- name: Create Pull Request
59+
if: steps.check_changes.outputs.changed == 'true'
60+
id: create_pr
61+
uses: peter-evans/create-pull-request@v6
62+
with:
63+
token: ${{ secrets.GITHUB_TOKEN }}
64+
commit-message: 'chore: Update Solutions Analyzer CSV files and documentation'
65+
branch: solutions-analyzer-update
66+
delete-branch: true
67+
title: 'chore: Update Solutions Analyzer CSV files and documentation'
68+
body: |
69+
## Automated Solutions Analyzer Update
70+
71+
This PR contains automated updates to:
72+
- Solutions connector-to-tables mapping CSV
73+
- Solutions issues and exceptions report CSV
74+
- Connector documentation files
75+
76+
Generated by the Solutions Analyzer workflow.
77+
78+
**Triggered by:** ${{ github.event_name }}
79+
**Workflow run:** ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
80+
labels: automated, documentation
81+
add-paths: |
82+
Tools/Solutions Analyzer/solutions_connectors_tables_mapping.csv
83+
Tools/Solutions Analyzer/solutions_connectors_tables_issues_and_exceptions_report.csv
84+
Tools/Solutions Analyzer/connector-docs/
85+
86+
- name: Enable auto-merge
87+
if: steps.check_changes.outputs.changed == 'true' && steps.create_pr.outputs.pull-request-number != ''
88+
run: |
89+
gh pr merge ${{ steps.create_pr.outputs.pull-request-number }} --auto --squash
90+
env:
91+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92+
93+
- name: Create summary
94+
if: steps.check_changes.outputs.changed == 'true'
95+
run: |
96+
echo "### Solutions Analyzer Pull Request Created :white_check_mark:" >> $GITHUB_STEP_SUMMARY
97+
echo "" >> $GITHUB_STEP_SUMMARY
98+
echo "A pull request has been created with updated CSV files and documentation." >> $GITHUB_STEP_SUMMARY
99+
echo "" >> $GITHUB_STEP_SUMMARY
100+
echo "**Modified files:**" >> $GITHUB_STEP_SUMMARY
101+
echo "- Tools/Solutions Analyzer/solutions_connectors_tables_mapping.csv" >> $GITHUB_STEP_SUMMARY
102+
echo "- Tools/Solutions Analyzer/solutions_connectors_tables_issues_and_exceptions_report.csv" >> $GITHUB_STEP_SUMMARY
103+
echo "- Tools/Solutions Analyzer/connector-docs/" >> $GITHUB_STEP_SUMMARY
104+
105+
- name: No changes summary
106+
if: steps.check_changes.outputs.changed == 'false'
107+
run: |
108+
echo "### Solutions Analyzer :information_source:" >> $GITHUB_STEP_SUMMARY
109+
echo "" >> $GITHUB_STEP_SUMMARY
110+
echo "No changes detected. CSV files and documentation are already up-to-date." >> $GITHUB_STEP_SUMMARY

.script/package-automation/catalogAPI.ps1

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,37 @@ function GetOfferVersion($offerId, $mainTemplateUrl)
123123

124124
function GetPackageVersion($defaultPackageVersion, $offerId, $offerDetails, $packageVersionAttribute, $userInputPackageVersion)
125125
{
126+
$setPackageVersion = $defaultPackageVersion
127+
126128
if ($packageVersionAttribute)
127129
{
128130
$userInputMajor,$userInputMinor,$userInputBuild,$userInputRevision = $userInputPackageVersion.split(".")
129131
$defaultMajor,$defaultMinor,$defaultBuild,$defaultRevision = $defaultPackageVersion.split(".")
130132

131-
if ($userInputMajor -ge '2' -and $userInputMinor -gt $defaultMinor)
132-
{
133-
#return as is value of package version as middle value is greater
134-
return $userInputPackageVersion
133+
# Convert to integers for proper numeric comparison
134+
[int]$userInputMajor = $userInputMajor
135+
[int]$userInputMinor = $userInputMinor
136+
[int]$userInputBuild = $userInputBuild
137+
[int]$defaultMajor = $defaultMajor
138+
[int]$defaultMinor = $defaultMinor
139+
[int]$defaultBuild = $defaultBuild
140+
141+
if ($userInputMajor -ge 3) {
142+
# Version 3.x.x or higher: use user input if minor and build are greater than default
143+
if ($userInputMinor -ge $defaultMinor -and $userInputBuild -gt $defaultBuild) {
144+
$setPackageVersion = $userInputPackageVersion
145+
if ($null -eq $offerDetails) {
146+
Write-Host "Package version set to $setPackageVersion"
147+
return $setPackageVersion
148+
}
149+
} elseif ($null -eq $offerDetails) {
150+
Write-Host "Package version set to $userInputPackageVersion"
151+
return $userInputPackageVersion
152+
}
153+
} elseif ($userInputMajor -le 2) {
154+
# Version 2.x.x: always use default
155+
Write-Host "Package version set to $defaultPackageVersion"
156+
return $defaultPackageVersion
135157
}
136158
}
137159

@@ -174,13 +196,13 @@ function GetPackageVersion($defaultPackageVersion, $offerId, $offerDetails, $pac
174196
{
175197
$identifiedOfferVersion = $offerMetadataVersion
176198
$catalogMajor,$catalogminor,$catalogbuild,$catalogrevision = $identifiedOfferVersion.split(".")
177-
$defaultMajor,$defaultminor,$defaultbuild,$defaultrevision = $defaultPackageVersion.split(".")
199+
$defaultMajor,$defaultminor,$defaultbuild,$defaultrevision = $setPackageVersion.split(".")
178200

179-
if ($defaultMajor -gt $catalogMajor)
201+
if ($defaultMajor -gt $catalogMajor -and $defaultminor -gt $catalogminor -and $defaultbuild -ge $catalogbuild)
180202
{
181-
# eg: 3.0.0 > 2.0.1 ==> 3.0.0
182-
Write-Host "Default Package version is greater then the CatalogAPI version so $defaultVersionMessage"
183-
return $defaultPackageVersion
203+
# eg: 3.0.0 > 2.0.1 ==> 3.0.0 or 3.1.2 > 3.1.1 ==> 3.1.2
204+
Write-Host "Package version $setPackageVersion greater then the CatalogAPI version so $defaultVersionMessage"
205+
return $setPackageVersion
184206
}
185207
else
186208
{

.script/tests/KqlvalidationsTests/CustomTables/AZFWApplicationRule.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"Name": "ActionReason",
1010
"Type": "string"
1111
},
12+
{
13+
"Name": "_BilledSize",
14+
"Type": "real"
15+
},
1216
{
1317
"Name": "DestinationPort",
1418
"Type": "int"
@@ -17,6 +21,14 @@
1721
"Name": "Fqdn",
1822
"Type": "string"
1923
},
24+
{
25+
"Name": "_IsBillable",
26+
"Type": "string"
27+
},
28+
{
29+
"Name": "IsExplicitProxyRequest",
30+
"Type": "bool"
31+
},
2032
{
2133
"Name": "IsTlsInspected",
2234
"Type": "bool"
@@ -57,6 +69,10 @@
5769
"Name": "SourceSystem",
5870
"Type": "string"
5971
},
72+
{
73+
"Name": "_SubscriptionId",
74+
"Type": "string"
75+
},
6076
{
6177
"Name": "TargetUrl",
6278
"Type": "string"
@@ -76,6 +92,14 @@
7692
{
7793
"Name": "WebCategory",
7894
"Type": "string"
95+
},
96+
{
97+
"Name": "_TimeReceived",
98+
"Type": "datetime"
99+
},
100+
{
101+
"Name": "_ItemId",
102+
"Type": "string"
79103
}
80104
]
81105
}

.script/tests/KqlvalidationsTests/CustomTables/AZFWDnsQuery.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@
8888
{
8989
"Name": "Type",
9090
"Type": "string"
91+
},
92+
{
93+
"Name": "_TimeReceived",
94+
"Type": "datetime"
95+
},
96+
{
97+
"Name": "_ItemId",
98+
"Type": "string"
9199
}
92100
]
93101
}

.script/tests/KqlvalidationsTests/CustomTables/AZFWIdpsSignature.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@
8080
{
8181
"Name": "SignatureId",
8282
"Type": "string"
83+
},
84+
{
85+
"Name": "_TimeReceived",
86+
"Type": "datetime"
87+
},
88+
{
89+
"Name": "_ItemId",
90+
"Type": "string"
8391
}
8492
]
8593
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"Name": "AZFWNatRule",
3+
"Properties": [
4+
{
5+
"Name": "_BilledSized",
6+
"Type": "real"
7+
},
8+
{
9+
"Name": "DestinationIp",
10+
"Type": "string"
11+
},
12+
{
13+
"Name": "DestinationPort",
14+
"Type": "int"
15+
},
16+
{
17+
"Name": "_IsBillable",
18+
"Type": "string"
19+
},
20+
{
21+
"Name": "Policy",
22+
"Type": "string"
23+
},
24+
{
25+
"Name": "Protocol",
26+
"Type": "string"
27+
},
28+
{
29+
"Name": "_ResourceId",
30+
"Type": "string"
31+
},
32+
{
33+
"Name": "Rule",
34+
"Type": "string"
35+
},
36+
{
37+
"Name": "RuleCollection",
38+
"Type": "string"
39+
},
40+
{
41+
"Name": "RuleCollectionGroup",
42+
"Type": "string"
43+
},
44+
{
45+
"Name": "SourceIp",
46+
"Type": "string"
47+
},
48+
{
49+
"Name": "SourcePort",
50+
"Type": "int"
51+
},
52+
{
53+
"Name": "SourceSystem",
54+
"Type": "string"
55+
},
56+
{
57+
"Name": "_SubscriptionId",
58+
"Type": "string"
59+
},
60+
{
61+
"Name": "TenantId",
62+
"Type": "string"
63+
},
64+
{
65+
"Name": "TimeGenerated",
66+
"Type": "datetime"
67+
},
68+
{
69+
"Name": "TranslatedIp",
70+
"Type": "string"
71+
},
72+
{
73+
"Name": "TranslatedPort",
74+
"Type": "int"
75+
},
76+
{
77+
"Name": "Type",
78+
"Type": "string"
79+
},
80+
{
81+
"Name": "_TimeReceived",
82+
"Type": "datetime"
83+
},
84+
{
85+
"Name": "_ItemId",
86+
"Type": "string"
87+
}
88+
]
89+
}

0 commit comments

Comments
 (0)