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

Fix vso commands execution in vulnerable variables #3987

Merged

Conversation

KonstantinTyukalov
Copy link
Contributor

@KonstantinTyukalov KonstantinTyukalov commented Oct 10, 2022

Description:
*.DefinitionName and *.SourceVersionMessage may contain vso commands which will be executed if it will be specified in script as output
We want to prevent this behavior by deactivating commands in this variables

Changelog:

  • Added DeactivateVsoCommands util which disables all vso commands in line
  • Added Scrubbing of vso commands from job message variables which may be echoed in customer's pipelines
  • Added unit tests

@KonstantinTyukalov KonstantinTyukalov marked this pull request as ready for review October 14, 2022 16:03
src/Agent.Worker/Variables.cs Outdated Show resolved Hide resolved
src/Test/L0/Worker/WorkerL0.cs Show resolved Hide resolved
@KonstantinTyukalov KonstantinTyukalov self-assigned this Oct 27, 2022
@KonstantinTyukalov
Copy link
Contributor Author

not added trace events to debug potential problems, will do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants