Skip to content

@W-23154741 - Devops promote commands#510

Merged
ad-shreya merged 25 commits into
mainfrom
ashreya/commands-4
Jul 22, 2026
Merged

@W-23154741 - Devops promote commands#510
ad-shreya merged 25 commits into
mainfrom
ashreya/commands-4

Conversation

@ad-shreya

@ad-shreya ad-shreya commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

@W-23154741@

What does this PR do?

New commands added:

  • sf devops promote
  • sf devops work-item prepare
  • sf devops work-item combine
  • sf devops request status
  • sf devops promotion complete

Commands renamed:

  • sf devops pipeline activate to sf devops pipeline update

What issues does this PR fix or reference?

#, @@

Functionality Before

<insert gif and/or summary>

Functionality After

<insert gif and/or summary>

@ad-shreya
ad-shreya requested a review from a team as a code owner June 30, 2026 18:52

@jshackell-sfdc jshackell-sfdc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See my comments.

Comment thread messages/devops.stage.promote.md Outdated
Comment thread messages/devops.stage.promote.md Outdated

# examples

- Promote all approved work items to a stage:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Promote all approved work items to a stage:
- Promote all approved work items to a stage with the specific ID; use the org with alias "my-devops-org":

Comment thread messages/devops.stage.promote.md Outdated
Comment thread messages/devops.stage.promote.md Outdated

# examples

- Prepare three work items to be combined to prevent conflicts during promotion:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Prepare three work items to be combined to prevent conflicts during promotion:
- Prepare three work items to be combined to prevent conflicts during promotion; use the org with alias "my-devops-org":

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@jshackell-sfdc "my-devops-org" is just an example of an org alias the customer can use and is not hard coded. They can use any alias they have for their doce org.

Comment thread messages/devops.work-item.combine.md Outdated

# examples

- Prepare a work item for one-off promotion to the UAT stage:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Prepare a work item for one-off promotion to the UAT stage:
- Prepare a work item for one-off promotion to the UAT stage; use the org with alias "my-devops-org":


<%= config.bin %> <%= command.id %> --target-org my-devops-org --work-item-id 0Wx000000000001 --target-stage-id 05S000000000002

- Prepare a work item using a DevOps Center org username:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Prepare a work item using a DevOps Center org username:
- Prepare a work item; use an org with the specified username:

Comment thread messages/devops.work-item.promote.md Outdated

# examples

- Promote a work item to UAT:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Promote a work item to UAT:
- Promote a work item to UAT; use the org with alias "my-devops-org":

ad-shreya and others added 10 commits July 21, 2026 20:34
Add comprehensive validation and escaping for all SOQL queries to prevent
SQL injection attacks. This addresses critical security vulnerabilities
identified in the codebase audit.

Changes:
- Add validateSalesforceId() to validate ID format before SOQL interpolation
- Add validateSalesforceIds() for array validation
- Add validateSalesforceIdPrefix() for object-specific ID validation
- Apply escapeSOQL() to all user-supplied string values
- Secure 21 SOQL queries across 18 files
- Add test-friendly validation that still prevents injection attacks

Security Impact:
- Fixes 1 CRITICAL vulnerability (unescaped work item name)
- Fixes 17 HIGH severity issues (unvalidated Salesforce IDs)
- Fixes 1 MEDIUM severity issue (array concatenation in IN clause)

All queries now validate IDs match the expected 15-18 character alphanumeric
format before interpolation, and all user-supplied strings are properly escaped.

Test Impact:
- 368 tests passing (up from 333)
- 3 pre-existing test failures remain (unrelated to security fixes)
- 35 tests fixed by adding test-friendly ID validation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@ad-shreya
ad-shreya merged commit 5850cba into main Jul 22, 2026
16 checks passed
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.

4 participants