-
Notifications
You must be signed in to change notification settings - Fork 0
Release v1.1.14 #358
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
Merged
Release v1.1.14 #358
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
18482d7
Initial plan
Copilot 3652d8d
fix: pass percent-decoded URI to resolveUri callback and update JSDoc
Copilot 75c623d
Potential fix for pull request finding
ormidales 2c06092
Potential fix for pull request finding
ormidales 007acde
Merge pull request #352 from ormidales/copilot/major-fix-gltloader-ur…
ormidales 4d94ef7
Initial plan
Copilot aecdcea
fix: use FNV-1a hash as shader cache key instead of raw GLSL source
Copilot f545e94
Potential fix for pull request finding
ormidales 3e75274
Merge pull request #353 from ormidales/copilot/fix-glsl-source-as-key
ormidales 1d0517b
Initial plan
Copilot 12b9d92
fix: enforce maxJsonBufferBytes on decoded string before JSON.parse
Copilot 0e0f08b
Potential fix for pull request finding
ormidales 3218c0a
Potential fix for pull request finding
ormidales 2401701
Potential fix for pull request finding
ormidales 21c6163
fix: correct test thresholds and JSDoc units for text.length*2 guard
Copilot 66a2b51
Merge pull request #354 from ormidales/copilot/fix-json-parse-unbound…
ormidales 8ac1510
Initial plan
Copilot 1d85646
fix(csp): enforce strict-dynamic with hash; replace bare self with no…
Copilot db64e80
fix(csp): clarify strict-dynamic requirement in SECURITY.md; add hash…
Copilot ef0314b
Merge pull request #355 from ormidales/copilot/fix-csp-meta-tag-issue
ormidales e07fcb0
Initial plan
Copilot 4f6c9e9
fix(ShaderCache): validate explicit key length — throw RangeError for…
Copilot a0f4392
Merge pull request #356 from ormidales/copilot/patch-fix-shadercache-…
ormidales 2311f4a
Initial plan
Copilot 6e96d64
fix: add URI length cap in validateExternalUri strict mode to prevent…
Copilot ed64cb9
fix: clarify MAX_URI_LENGTH comment and include len/max in rejection …
Copilot acfd81a
Merge pull request #357 from ormidales/copilot/patch-fix-validate-ext…
ormidales c5adddf
Bump version from 1.1.13 to 1.1.14
ormidales 3319786
Bump version from 1.1.13 to 1.1.14
ormidales 7243366
Initial plan
Copilot fa861dc
fix: address review feedback for GltfLoader and ShaderCache
Copilot 209675a
fix: validate JSON size options, add GLB chunk bounds check, fix brit…
Copilot febc750
Merge pull request #359 from ormidales/copilot/sub-pr-358
ormidales File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # Security Policy | ||
|
|
||
| ## Content Security Policy | ||
|
|
||
| All public HTML pages in this project set a `Content-Security-Policy` meta tag. | ||
| The policy is intentionally strict and follows these principles: | ||
|
|
||
| ### `script-src` — no bare `'self'` | ||
|
|
||
| Allowing `script-src 'self'` permits any script file served from the same origin | ||
| to execute, including any accidentally committed debug script or a compromised | ||
| static asset. Instead, each page uses the minimum required permission: | ||
|
|
||
| | Page | Approach | Rationale | | ||
| |------|----------|-----------| | ||
| | `index.html` | `'none'` | No script is loaded | | ||
| | `demos.html` | `'none'` | No script is loaded | | ||
| | `gallery.html` | `'none'` | No script is loaded | | ||
| | `demo.html` | SHA-256 hash + `'strict-dynamic'` | Restricts execution to the single known inline bootstrap import | | ||
|
|
||
| #### Hash-based policy for `demo.html` | ||
|
|
||
| `demo.html` boots the application with a single inline module: | ||
|
|
||
| ```html | ||
| <script type="module">import '/src/main.ts'</script> | ||
| ``` | ||
|
|
||
| The SHA-256 hash of that exact inline content (`import '/src/main.ts'`) is | ||
| pre-computed and embedded in the `script-src` directive: | ||
|
|
||
| ``` | ||
| script-src 'sha256-NDWEjzGVmgdl6gIijt3W2YpACKUzjdbNjuRCLQIRDKo=' 'strict-dynamic' | ||
| ``` | ||
|
|
||
| `'strict-dynamic'` propagates the trust granted by the hash to any modules | ||
| dynamically imported by that script (i.e. the rest of the application bundle). | ||
| **`demo.html` requires `'strict-dynamic'` support to function correctly.** | ||
| Without it, the browser will allow the inline bootstrap script (whose hash | ||
| matches) but block its `import '/src/main.ts'` call, because no host source | ||
| such as `'self'` is present to authorize the external module load. All browsers | ||
| that support WebGL 2.0 also support `'strict-dynamic'` (Chrome 52+, Firefox 52+, | ||
| Safari 15.4+), so this is not a practical limitation for this project. | ||
|
|
||
| #### Recomputing the hash | ||
|
|
||
| If the inline bootstrap script ever changes, recompute the hash with: | ||
|
|
||
| ```bash | ||
| printf "import '/src/main.ts'" | openssl dgst -sha256 -binary | base64 | ||
| ``` | ||
|
|
||
| Replace the `sha256-…` value in `demo.html` with the new output. | ||
|
|
||
| ### Other directives | ||
|
|
||
| | Directive | Value | Reason | | ||
| |-----------|-------|--------| | ||
| | `object-src` | `'none'` | Disables Flash and other plug-in content | | ||
| | `base-uri` | `'self'` | Prevents base-tag hijacking | | ||
| | `default-src` | `'self'` | Safe fallback for unlisted resource types | | ||
| | `connect-src` | `'self' ws://localhost:* …` | Permits Vite HMR WebSocket in development | | ||
| | `unsafe-eval` | absent | Disallows `eval()` and similar constructs | | ||
|
|
||
| ## Reporting a Vulnerability | ||
|
|
||
| If you discover a security vulnerability in this project, please open a GitHub | ||
| issue with the label **security**. For sensitive reports you may contact the | ||
| maintainers directly via the repository's GitHub profile. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.