-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into zahra-infra-deployment
- Loading branch information
Showing
18 changed files
with
156 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Check changes to static files | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
changed_files: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: List changed frontend source files | ||
uses: tj-actions/changed-files@v44 | ||
id: changed-frontend-src-files | ||
with: | ||
files: | | ||
frontend/src/**/*.tsx | ||
frontend/src/**/*.css | ||
- name: List changed frontend static files | ||
id: changed-frontend-static-files | ||
if: steps.changed-frontend-src-files.outputs.files_changed == 'true' | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
files: | | ||
static | ||
- name: Check changed static files | ||
if: steps.changed-frontend-src-files.outputs.files_changed == 'true' && steps.changed-frontend-static-files.outputs.files_changed == 'false' | ||
run: echo "There were changes to the frontend code, but no corresponding changes to static files. Please build the project locally, commit the static file changes and push the changes to try again." && exit 1 | ||
|
||
- name: List logo customizations | ||
uses: tj-actions/changed-files@v44 | ||
id: changed-logo-files | ||
with: | ||
files: | | ||
frontend/public/favicon.ico | ||
frontend/src/assets | ||
- name: Comment on logo customizations | ||
if: steps.changed-logo-files.outputs.any_changed == 'true' | ||
uses: mshick/add-pr-comment@v2 | ||
with: | ||
message: | | ||
"Hello contributor, it appears that your pull request contains some customizations to branding. We are unable to approve your PR at this time. If you believe this message to be in error, please correct these unsupported changes and try again, or reach out to one of the maintainers of the repo to discuss the changes." | ||
- name: Fail on logo customizations | ||
if: steps.changed-logo-files.outputs.any_changed == 'true' | ||
run: echo "Logos are customized, which is not a supported change." && exit 1 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Close inactive issues | ||
on: | ||
schedule: | ||
- cron: "30 1 * * *" | ||
|
||
jobs: | ||
close-issues: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/stale@v5 | ||
with: | ||
days-before-issue-stale: 60 | ||
days-before-issue-close: 14 | ||
stale-issue-label: "stale" | ||
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." | ||
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." | ||
days-before-pr-stale: 60 | ||
days-before-pr-close: 14 | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import json | ||
|
||
def get_msdefender_user_json(authenticated_user_details, request_headers): | ||
def get_msdefender_user_json(authenticated_user_details, request_headers, conversation_id): | ||
auth_provider = authenticated_user_details.get('auth_provider') | ||
source_ip = request_headers.get('X-Forwarded-For', request_headers.get('Remote-Addr', '')) | ||
source_ip = request_headers.get('Remote-Addr', '') | ||
header_names = ['User-Agent', 'X-Forwarded-For', 'Forwarded', 'X-Real-IP', 'True-Client-IP', 'CF-Connecting-IP'] | ||
user_args = { | ||
"EndUserId": authenticated_user_details.get('user_principal_id'), | ||
"EndUserIdType": "EntraId" if auth_provider == "aad" else auth_provider, | ||
"SourceIp": source_ip.split(':')[0], #remove port | ||
"SourceRequestHeaders": {header: request_headers[header] for header in header_names if header in request_headers}, | ||
"ConversationId": conversation_id, | ||
} | ||
return json.dumps(user_args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,5 @@ export const XSSAllowTags = [ | |
'ol', | ||
'li' | ||
] | ||
|
||
export const XSSAllowAttributes = ['href'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
static/assets/index-252b88f2.js → static/assets/index-2e11eaf6.js
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
static/assets/index-252b88f2.js.map → static/assets/index-2e11eaf6.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters