Skip to content

Use Yaml SafeConstructor to prevent serialization issues#355

Merged
mr-c merged 1 commit intocommon-workflow-language:mainfrom
kinow:sec-01
Sep 30, 2021
Merged

Use Yaml SafeConstructor to prevent serialization issues#355
mr-c merged 1 commit intocommon-workflow-language:mainfrom
kinow:sec-01

Conversation

@kinow
Copy link
Member

@kinow kinow commented Sep 30, 2021

Description

@mr-c I've successfully reproduced an issue with serialization. From the same page with the exploit, looks like passing the SafeConstructor fixes it (it's a class provided by SnakeYaml that prevents certain things from being accessed when constructing objects.)

Motivation and Context

Prevent serialization issues as reported in #241 (comment)

How Has This Been Tested?

Locally.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Not sure how this could be tested 👍 static analyzers will spot the issue again (assuming the static analyzers are able to comprehend that SafeConstructor fixes the issue)

@lgtm-com
Copy link

lgtm-com bot commented Sep 30, 2021

This pull request fixes 1 alert when merging 71aeade into 7b8eb67 - view on LGTM.com

fixed alerts:

  • 1 for Deserialization of user-controlled data

@mr-c mr-c enabled auto-merge (squash) September 30, 2021 12:23
@mr-c mr-c merged commit f6066f0 into common-workflow-language:main Sep 30, 2021
@lgtm-com
Copy link

lgtm-com bot commented Sep 30, 2021

This pull request fixes 1 alert when merging 3e7b69f into 7b8eb67 - view on LGTM.com

fixed alerts:

  • 1 for Deserialization of user-controlled data

@kinow kinow deleted the sec-01 branch September 30, 2021 12:30
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.

2 participants