Browser security policy configuration
Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder
npx -y skills add HolobiomicsLab/asb-skill-collections --skill browser-security-policy-configurationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when you need to run a web application locally (by opening index.html directly in the browser) and the application uses WebWorker or WebAssembly modules that fail to load with cross-origin policy or file-access errors.
The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.3 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
browser-security-policy-configuration
Summary
Configure browser-specific security policies to permit local file access for WebWorker and WebAssembly execution when running web applications (such as NMR spectra viewers) from the local file system. This skill is necessary because modern browsers restrict cross-origin resource sharing and file access by default, preventing client-side modules from loading.
When to use
Apply this skill when you need to run a web application locally (by opening index.html directly in the browser) and the application uses WebWorker or WebAssembly modules that fail to load with cross-origin policy or file-access errors. Typical symptom: WebWorker or WebAssembly components do not initialize when the application is loaded via file:// protocol.
When NOT to use
- Do not use this skill when deploying the application to a web server (http:// or https://) — server-based deployment does not require relaxing local file access policies.
- Do not use this skill if the application does not use WebWorker or WebAssembly — standard web applications do not require these policies.
- Do not use this skill for production or untrusted web content — modifying these settings poses a security risk and should only be applied to locally verified, safe code.
Inputs
- index.html (local file path)
- browser executable or settings interface
- WebWorker and WebAssembly module files
Outputs
- configured browser instance with local file access enabled
- successful WebWorker and WebAssembly initialization
- rendered web application without security policy errors
How to apply
Identify which browser you are using (Google Chrome, Mozilla Firefox, or Safari) and apply the corresponding configuration mechanism. For Chrome, add the --allow-file-access-from-files flag to the executable target path in the browser's properties. For Firefox, navigate to about:config and set security.fileuri.strict_origin_policy to false. For Safari, enable 'Show Develop menu in menu bar' in Advanced settings, then select 'Disable Local File Restrictions' from the Develop menu. After applying the configuration, restart the browser and reload index.html locally. Verify that WebWorker and WebAssembly components initialize without errors by checking the browser console for cross-origin or file-access policy exceptions.
Related tools
- Google Chrome (browser runtime requiring --allow-file-access-from-files flag to permit local WebWorker and WebAssembly loading)
- Mozilla Firefox (browser runtime requiring security.fileuri.strict_origin_policy to be set to false in about:config to permit local WebWorker and WebAssembly loading)
- Safari (browser runtime requiring 'Disable Local File Restrictions' to be enabled via the Develop menu to permit local WebWorker and WebAssembly loading)
- WebWorker (client-side JavaScript feature for executing background scripts; requires local file access policy relaxation when loaded from file:// protocol)
- WebAssembly (binary module format executed in the browser; requires local file access policy relaxation when loaded from file:// protocol)
- COLMARvista (example web-based NMR spectra viewer that uses WebWorker and WebAssembly and demonstrates the need for browser security policy configuration when run locally) — https://github.com/lidawei1975/colmarvista
Evaluation signals
- Browser restarts successfully with the applied configuration flag or setting change without crashing or reverting.
- index.html loads in the browser without raising a file-access policy error in the browser console.
- WebWorker and WebAssembly modules initialize and report no cross-origin or file-access policy exceptions in the JavaScript console.
- Application functionality that depends on WebWorker or WebAssembly (e.g., NMR spectrum rendering, data processing) executes without errors.
- No security warnings or policy violation messages appear in the developer tools Network or Console tabs.
Limitations
- Modifying browser security policies poses a security risk and should only be applied to locally verified, safe code. Do not load any local files unless you are certain they are safe.
- Browser configuration changes may not persist across browser updates; reconfiguration may be required after a major version upgrade.
- Each browser requires a distinct configuration mechanism; there is no single cross-browser configuration method for local file access.
- These configurations enable broad local file access, not granular per-application permissions; all local files and applications will gain file-access privileges.
Evidence
- [readme] This program uses WebWorker and WebAssembly, which cannot be loaded automatically when run locally unless you modify your browser settings.: "This program uses WebWorker and WebAssembly, which cannot be loaded automatically when run locally unless you modify your browser settings."
- [readme] For Google Chrome, add the --allow-file-access-from-files flag to the executable target path.: "In the "Target" field, add the following flag to the end of the existing path: --allow-file-access-from-files."
- [readme] For Mozilla Firefox, navigate to about:config and set security.fileuri.strict_origin_policy to false.: "Search for security.fileuri.strict_origin_policy in the configuration page. Change its value to false."
- [readme] For Safari, enable 'Disable Local File Restrictions' via the Develop menu.: "In the menu bar, click "Develop" and select "Disable Local File Restrictions.""
- [intro] Verify each configuration by loading index.html locally and confirming WebWorker and WebAssembly components initialize without cross-origin or file-access policy errors.: "Verify each configuration by loading index.html locally and confirming WebWorker and WebAssembly components initialize without cross-origin or file-access policy errors."
- [readme] Modifying these settings poses a security risk.: "Warning: Modifying these settings poses a security risk. Do not load any local files unless you are certain they are safe."