Skip to content

fix: fixed copilot comments#258

Merged
Roopan-Microsoft merged 1 commit into
devfrom
psl-fixcopilotcomments-cm-vs
May 26, 2026
Merged

fix: fixed copilot comments#258
Roopan-Microsoft merged 1 commit into
devfrom
psl-fixcopilotcomments-cm-vs

Conversation

@VishalS-Microsoft
Copy link
Copy Markdown
Contributor

Purpose

This pull request focuses on improving the reliability and security of GitHub Actions workflows by enhancing input validation and ensuring proper HTML escaping in notification jobs. The main changes include stricter input checks for deployment configurations and the introduction of a shell function to escape HTML in notification content, preventing potential formatting or injection issues.

Input validation improvements:

  • Added a check in .github/workflows/job-deploy.yml to ensure that enable_scalability can only be set to true if waf_enabled is also true, preventing invalid deployment configurations.

Notification job HTML escaping:

  • Introduced a html_escape shell function in .github/workflows/job-send-notification.yml to safely escape special HTML characters in notification fields.
  • Updated the notification job to use the html_escape function for user-supplied values such as RESOURCE_GROUP, ACTOR, and BRANCH, ensuring all dynamic content in notification emails is properly escaped. [1] [2]
  • Modified the notification email templates to use the escaped variables instead of raw values, further improving security and display consistency. [1] [2]

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request hardens CI/CD GitHub Actions workflows by adding stricter deployment input validation and consistently HTML-escaping dynamic values embedded into notification emails.

Changes:

  • Added a validation rule in the deploy reusable workflow to prevent enable_scalability: true unless waf_enabled: true.
  • Introduced/reused an html_escape shell function and applied it to actor/branch/resource-group fields in notification email templates.
  • Cleaned up the notification workflow header line (removing odd leading characters/indentation).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/job-send-notification.yml Adds HTML escaping for dynamic email fields (actor/branch/resource group) to reduce HTML/attribute injection risk in notifications.
.github/workflows/job-deploy.yml Tightens workflow input validation by enforcing a valid enable_scalability + waf_enabled combination.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Roopan-Microsoft Roopan-Microsoft merged commit 8208fe3 into dev May 26, 2026
10 checks passed
@Roopan-Microsoft Roopan-Microsoft deleted the psl-fixcopilotcomments-cm-vs branch May 26, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants