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

Enable l2-resource-asset-archive test #684

Merged
merged 2 commits into from
Nov 18, 2024
Merged

Enable l2-resource-asset-archive test #684

merged 2 commits into from
Nov 18, 2024

Conversation

Frassle
Copy link
Member

@Frassle Frassle commented Nov 15, 2024

This is a bit more of an involved change to get this test working. Making two major changes.

Firstly, historically YAML would always send absolute paths instead of relative paths to the engine. This was wrong, the engine expects that paths should be relative so that we don't save absolute paths to the state file.

Secondly, YAML would error if you tried to access what it considered "unsafe" paths. That was either paths that clearly accessed outside the Pulumi.yaml directory, or non-constant paths to the remote asset and archive types. This seems overly restrictive, none of our other languages try to protect the user like this and it seems reasonable to expect to be able to do similar filesystem accesses from YAML.

@Frassle Frassle force-pushed the fraser/l2-ass branch 3 times, most recently from b50c32a to a2015af Compare November 15, 2024 15:11
@Frassle Frassle changed the title Fraser/l2 ass Enable l2-resource-asset-archive test Nov 15, 2024
@Frassle Frassle marked this pull request as ready for review November 15, 2024 15:16
@Frassle Frassle requested a review from a team as a code owner November 15, 2024 15:16
runtime: yaml
outputs:
readme:
fn::readFile: ${pulumi.cwd}/../../go.mod # imagine this is /etc/shadow, /var/run/secrets/tokens, etc.
Copy link
Contributor

Choose a reason for hiding this comment

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

This made me pause for a second, as it's security related. I don't think it's in our security model to guard against users doing anything in their programs in general though (that would be really hard to do in other supported languages anyway). The user running the program needs to be the one to inspect and trust it, so I think removing this restriction is fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

That was my thinking

Co-authored-by: Thomas Gummerer <t.gummerer@gmail.com>
@Frassle Frassle merged commit 61b83d7 into main Nov 18, 2024
6 checks passed
@Frassle Frassle deleted the fraser/l2-ass branch November 18, 2024 10:06
@pulumi-bot
Copy link

This PR has been shipped in release v1.12.0.

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