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

Python: model os path file accesses #6741

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

@yoff
Copy link
Contributor

@yoff yoff commented Sep 23, 2021

This PR includes a number of functions in os.path into the concept FileSystemAccess. These all test for the existence of files in some way.

There are a few more functions that could reveal information about the file system, by telling the last modification time of a file, e.g. getmtime. This will raise an error if the file does not exist, so could also reveal the existence of files depending on the applications error handling. These are currently not included.

@yoff yoff requested a review from as a code owner Sep 23, 2021
Copy link
Member

@RasmusWL RasmusWL left a comment

There are a few more functions that could reveal information about the file system, by telling the last modification time of a file, e.g. getmtime. This will raise an error if the file does not exist, so could also reveal the existence of files depending on the applications error handling. These are currently not included.

Can we please model these as well? they fit the FileSystemAccess concept as far as I can tell.

@yoff yoff requested a review from RasmusWL Sep 30, 2021
"getatime", "getmtime", "getctime", "getsize",
// this will resolve symlinks
"realpath"
Copy link
Member

@RasmusWL RasmusWL Sep 30, 2021

As we discussed in meeting, let's handle realpath with an extra taint-step instead.

Suggested change
"getatime", "getmtime", "getctime", "getsize",
// this will resolve symlinks
"realpath"
"getatime", "getmtime", "getctime", "getsize"

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

Successfully merging this pull request may close these issues.

None yet

2 participants