GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — permission: resolve reference to an absolute path only for fs permission by daeyeon · Pull Request #47930 · nodejs/node

Conversation

@daeyeon

@daeyeon daeyeon commented May 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

For other candidate permissions, such as "net" or "env", this patch will pass the given reference without resolving it to an absolute path.

Signed-off-by: Daeyeon Jeong [email protected]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. labels May 9, 2023
@daeyeon

daeyeon commented May 9, 2023

Copy link
Copy Markdown
Member Author

/cc @nodejs/security-wg

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon
permission: resolve reference to absolute path only for fs permission
74bc8eb
For other candidate permissions, such as "net" or "env", this patch
will pass the reference without resolving it to an absolute path.

Signed-off-by: Daeyeon Jeong <[email protected]>
@daeyeon
daeyeon force-pushed the main.fix/permission-230509.Tue.917e branch from cbfbe91 to 74bc8eb Compare May 9, 2023 05:24
@tniessen

tniessen commented May 9, 2023

Copy link
Copy Markdown
Member

What other, non-path references are planned?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon

daeyeon commented May 9, 2023

Copy link
Copy Markdown
Member Author

AFAIK, it hasn't been discussed yet. I assume that, in the case of "env" permission, environment variable names would be used like: permission.has("env.read", "FOO,BOO").

Although it isn't entirely clear, the conversion to an absolute path seems to be applied to the "fs" permission only, and there seems to be a plan to move it to the C++ side in the future.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@marco-ippolito

marco-ippolito commented May 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

AFAIK, it hasn't been discussed yet. I assume that, in the case of "env" permission, environment variable names would be used like: permission.has("env.read", "FOO,BOO").

Although it isn't entirely clear, the conversion to an absolute path seems to be applied to the "fs" permission only, and there seems to be a plan to move it to the C++ side in the future.

I'm currently working on moving the resolve path to c++ side, so this check will be handled there @RafaelGSS

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon

daeyeon commented May 9, 2023

Copy link
Copy Markdown
Member Author

Thanks for confirming. It would be ideal to perform only type validation for the reference in JS side and let each permission C++ implementation handle parsing separately.

marco-ippolito reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

RafaelGSS
RafaelGSS approved these changes May 9, 2023
View reviewed changes
@RafaelGSS

RafaelGSS commented May 9, 2023

Copy link
Copy Markdown
Member

That's correct. Eventually, we'll have env or net that accept non-path parameters.

Thanks for confirming. It would be ideal to perform only type validation for the reference in JS side and let each permission C++ implementation handle parsing separately.

Correct, this is how it will work.

daeyeon reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

marco-ippolito
marco-ippolito approved these changes May 9, 2023
View reviewed changes
@RafaelGSS RafaelGSS added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 9, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 9, 2023
@nodejs-github-bot

nodejs-github-bot commented May 9, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/51721/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon daeyeon added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels May 9, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label May 11, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 4eec362 into nodejs:main May 11, 2023
@nodejs-github-bot

nodejs-github-bot commented May 11, 2023

Copy link
Copy Markdown
Collaborator

Landed in 4eec362

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon
daeyeon deleted the main.fix/permission-230509.Tue.917e branch May 11, 2023 16:32
targos pushed a commit that referenced this pull request May 12, 2023
@daeyeon @targos
permission: resolve reference to absolute path only for fs permission
af86625
For other candidate permissions, such as "net" or "env", this patch
will pass the reference without resolving it to an absolute path.

Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: #47930
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
@targos targos mentioned this pull request May 15, 2023
v20.2.0 release proposal #48020
Merged
@danielleadams danielleadams added the backport-requested-v18.x label Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@RafaelGSS RafaelGSS RafaelGSS approved these changes
@marco-ippolito marco-ippolito marco-ippolito approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@daeyeon @tniessen @marco-ippolito @RafaelGSS @nodejs-github-bot @danielleadams
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.