Using the new native file system API, web applications could read and save files, as well as gather information about the files stored on your device.
Google has taken another step to allow web applications in Chrome to edit and collect information about your files.
Using the new Native File System API, web applications could read and save files, as well as gather information about the number and names of files stored on your device.
To compensate for the risks, Google says it is implementing controls that will only allow the function to be used on "secure" sites and web applications, and only with the express consent of the user.
Google developer advocate Pete Le Page detailed how the API is available to test locally in Chrome 77, hidden behind a developer's flag, and will be available for more extensive testing by developers in the next Chrome 78
Google and its The other browser manufacturers have been frank about the risks of the function, formerly known as the Recordable File API, which they explain on an explanatory page.
"By far the most difficult part for this API will, of course, be the security model that will be used," they write.
"The API provides a lot of fear to websites that could be mistreated in many terrible ways.
" There are two important privacy risks (websites gain access to private data that was supposed to be they had no access) as well as security risks (websites that modify executables, install viruses, encrypt user data and demand rescue, etc.). Care must be taken to limit the amount of damage a website can do and ensure that the user understands what is giving him access to a website. "
Those risks are too great for some users, to whom The function worries that it will tear down an important wall between a web browser and a user's computer.
SEE: The Dark Web: A Guide for Business Professionals (Free PDF) (TechRepublic)  "One" The best thing about browsers is the way you can trust that they are reasonably protected from the rest of your machine, "wrote a browser user.
"Features like this chip eliminate that trust model and open new attack vectors against unsuspecting users. I get the benefits of usability, but the security implications are terrifying."
Google Page devotes much of its publication to security measures aimed at preventing abuse of the feature in Chrome.
"A web application cannot modify a file on disk without obtaining explicit permission from the user," says Le Page.
Only sites and web applications that open in a secure context, delivered through an authenticated and encrypted channel, may use the function.  The files will be opened using a file selector, where the user must select the files to which he wishes to grant access and the user may cancel the access at any time. Similar restrictions apply when saving a file, with the user's control over the name and location of the file saved through a file selector. When multiple files are going to be edited, the user can be asked to give permission when opening those files.
Page tells you that the browser "may limit the user's ability to save certain folders, for example, the main operating system folders such as Windows, the macOS library folders, etc.", and in those cases they can show users a message and ask them to choose a different folder.
When the user has given access to a web application to edit files, the icon below will appear in Chrome's Omnibox. By clicking on the icon, the files to which the browser has access are listed, and the user can revoke the access.
Web applications will only have access to files while the browser tab is open, although, in future versions of Chrome, Google plans to allow installed progressive web applications to have persistent access to files, saving file identifiers to IndexedDB databases.
Developers will begin conducting more thorough testing of the new API through a Source Test in Chrome 78 and Google is requesting comments on the design of the API through the GitHub repository of the WICG native file system.
This breaking of the barriers between the web and the device is not surprising given the continuous evolution of the browser from a website portal to a cross-platform to run applications, with WebAssembly promising to make it possible for the browser to work even Applications particularly demanding