Skip to content

Commit cf38160

Browse files
committed
Merge remote-tracking branch 'original/master'
# Conflicts: # Solutions/WithSecureElementsViaFunction/Data Connectors/WithSecureElementsViaFunctionConn.zip # Solutions/WithSecureElementsViaFunction/Data Connectors/requirements.txt
2 parents c479919 + 32c5154 commit cf38160

File tree

4,104 files changed

+413271
-127196
lines changed

Some content is hidden

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

4,104 files changed

+413271
-127196
lines changed

.github/workflows/ScanSecrets.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Checkout code
1111
uses: actions/checkout@v4
1212
with:
13-
fetch-depth: 0
13+
fetch-depth: 10
1414
- name: Secret Scanning
1515
uses: trufflesecurity/trufflehog@main
1616
with:

.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
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: AWS-S3 DataConnector Bundle Auto-Update
2+
run-name: Auto-updating AWS-S3 bundles for ${{ github.event.pull_request.head.ref }}
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- master
8+
paths:
9+
# Trigger when any of these files in AWS-S3 directory change
10+
- 'DataConnectors/AWS-S3/*.ps1'
11+
- 'DataConnectors/AWS-S3/*.py'
12+
- 'DataConnectors/AWS-S3/*.md'
13+
- 'DataConnectors/AWS-S3/CloudFormation/**'
14+
- 'DataConnectors/AWS-S3/Enviornment/**'
15+
- 'DataConnectors/AWS-S3/Utils/**'
16+
# Don't trigger on zip file changes (to avoid recursion)
17+
- '!DataConnectors/AWS-S3/*.zip'
18+
# Don't trigger on bundle automation documentation changes (not bundled)
19+
- '!DataConnectors/AWS-S3/BUNDLE_AUTOMATION.md'
20+
21+
# Allow manual workflow dispatch for testing
22+
workflow_dispatch:
23+
24+
jobs:
25+
auto-update-bundles:
26+
# Security: Block workflow execution on forked repositories
27+
if: ${{ !github.event.pull_request.head.repo.fork }}
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: write
31+
pull-requests: write
32+
33+
steps:
34+
- name: Generate a token
35+
id: generate_token
36+
uses: actions/create-github-app-token@v1
37+
with:
38+
app-id: ${{ secrets.APPLICATION_ID }}
39+
private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
40+
41+
- name: Checkout PR branch with sparse checkout
42+
uses: actions/checkout@v4
43+
with:
44+
token: ${{ steps.generate_token.outputs.token }}
45+
ref: ${{ github.event.pull_request.head.ref }}
46+
fetch-depth: 2 # Just need HEAD and parent for git diff
47+
persist-credentials: false # Security: Don't persist credentials after checkout
48+
sparse-checkout: |
49+
DataConnectors/AWS-S3
50+
.script
51+
sparse-checkout-cone-mode: false
52+
53+
- name: Restore bundling script from base branch
54+
run: |
55+
# Security: Use trusted script from base branch to prevent malicious PR modifications
56+
# Fetch the base branch to ensure we have the reference
57+
git fetch origin ${{ github.base_ref || 'master' }}:refs/remotes/origin/${{ github.base_ref || 'master' }}
58+
git checkout origin/${{ github.base_ref || 'master' }} -- .script/bundleAwsS3Scripts.sh
59+
chmod +x .script/bundleAwsS3Scripts.sh
60+
61+
- name: Check if auto-update needed
62+
id: check_update
63+
run: |
64+
# Skip if this commit already updated bundles (prevent loops)
65+
if git log -1 --name-only | grep -q "ConfigAwsS3DataConnectorScripts.*\.zip"; then
66+
echo "skip=true" >> $GITHUB_OUTPUT
67+
echo "Bundles already updated in latest commit"
68+
else
69+
echo "skip=false" >> $GITHUB_OUTPUT
70+
fi
71+
72+
- name: Update bundles
73+
if: steps.check_update.outputs.skip != 'true'
74+
run: |
75+
.script/bundleAwsS3Scripts.sh
76+
77+
- name: Commit updated bundles
78+
if: steps.check_update.outputs.skip != 'true'
79+
env:
80+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
81+
run: |
82+
git config --local user.email "action@github.com"
83+
git config --local user.name "GitHub Action"
84+
85+
# Configure remote with token for push (needed due to persist-credentials: false)
86+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git
87+
88+
# Stage zip files
89+
git add DataConnectors/AWS-S3/ConfigAwsS3DataConnectorScripts*.zip
90+
91+
# Check if there are changes to commit
92+
if ! git diff --cached --quiet; then
93+
git commit -m "Auto-update AWS-S3 DataConnector bundles
94+
95+
- Updated ConfigAwsS3DataConnectorScripts.zip
96+
- Updated ConfigAwsS3DataConnectorScriptsGov.zip
97+
- Changes triggered by: ${{ github.event.pull_request.head.sha }}
98+
99+
[skip ci]"
100+
101+
git push origin ${{ github.event.pull_request.head.ref }}
102+
103+
echo "✅ Successfully updated and committed bundle files"
104+
else
105+
echo "ℹ️ No bundle changes detected"
106+
fi

.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/content-validations.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
SYSTEM_PULLREQUEST_ISFORK: ${{ github.event.pull_request.head.repo.fork }}
2020
steps:
2121
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 2 # Only need HEAD and parent for git diff
2224
- run: npm install -g npm@6.14.18;which npm;npm -v
2325
- name: npm install
2426
run: npm install

.github/workflows/data-connector-validations.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
SYSTEM_PULLREQUEST_ISFORK: ${{ github.event.pull_request.head.repo.fork }}
2020
steps:
2121
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 2 # Need HEAD and parent for git diff
2224
- run: npm install -g npm@6.14.18;which npm;npm -v
2325
- name: npm install
2426
run: npm install

.github/workflows/detection-template-schema-validations.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
PRNUM: ${{ github.event.pull_request.number }}
1616
steps:
1717
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 2 # Need HEAD and parent for git diff
1820
- name: Use .NET Core SDK ${{ env.dotnetSdkVersion }}
1921
uses: actions/setup-dotnet@v4
2022
with:

.github/workflows/detection-validations.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
SYSTEM_PULLREQUEST_ISFORK: ${{ github.event.pull_request.head.repo.fork }}
2020
steps:
2121
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 2 # Only need HEAD and parent for git diff
2224
- run: npm install -g npm@6.14.18;which npm;npm -v
2325
- name: npm install
2426
run: npm install

.github/workflows/documents-link-validation.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
SYSTEM_PULLREQUEST_ISFORK: ${{ github.event.pull_request.head.repo.fork }}
2020
steps:
2121
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 2 # Only need HEAD and parent for git diff
2224
- run: npm install -g npm@6.14.18;which npm;npm -v
2325
- name: npm install
2426
run: npm install

.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

0 commit comments

Comments
 (0)