Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont allow msbuild to setvariables #14410

Merged
merged 3 commits into from
Feb 18, 2021
Merged

Dont allow msbuild to setvariables #14410

merged 3 commits into from
Feb 18, 2021

Conversation

damccorm
Copy link

Task name: MSBuildV1

Description: This will restrict the msbuild task from writing any variables (it shouldn't have any need to do this currently)

Documentation changes required: N

Added unit tests: N - did prove it works with a test pipeline though https://dev.azure.com/damccorm-repros/variableRestrictions/_build/results?buildId=1028&view=results

Attached related issue: N

Checklist:

  • Task version was bumped - please check instruction how to do it
  • Checked that applied changes work as expected

@damccorm damccorm requested a review from mjroghelia February 17, 2021 17:14
@damccorm damccorm requested a review from jtpetty as a code owner February 17, 2021 17:14
Copy link
Contributor

@jtpetty jtpetty left a comment

Choose a reason for hiding this comment

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

LGTM

@mjroghelia
Copy link
Contributor

Any reason we can't do "commands": { "mode": "restricted" } on this too?

@damccorm
Copy link
Author

Any reason we can't do "commands": { "mode": "restricted" } on this too?

Yes - that blocks ##vso[task.uploadfile], which can be called by the msbuild common package -

Write-Host "##vso[task.uploadfile]$LogFile"

@damccorm damccorm merged commit 9828cff into master Feb 18, 2021
damccorm pushed a commit that referenced this pull request Feb 18, 2021
* Dont allow msbuild to setvariables

* Require min agent version
@damccorm damccorm deleted the users/damccorm/msbuild branch February 18, 2021 18:33
damccorm pushed a commit that referenced this pull request Feb 26, 2021
@damccorm damccorm mentioned this pull request Feb 26, 2021
2 tasks
damccorm pushed a commit that referenced this pull request Feb 26, 2021
damccorm pushed a commit that referenced this pull request Feb 26, 2021
damccorm pushed a commit that referenced this pull request Feb 26, 2021
* Revert "Dont allow msbuild to setvariables (#14410)"

This reverts commit 9828cff.

* Revert commit and bump version
damccorm pushed a commit that referenced this pull request Feb 26, 2021
* Revert "Dont allow msbuild to setvariables (#14410)"

This reverts commit 9828cff.

* Revert commit and bump version
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