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

Add strict Permissions-Policy header #1583

Merged
merged 7 commits into from
Aug 10, 2023
Merged

Conversation

lukaw3d
Copy link
Member

@lukaw3d lukaw3d commented Aug 9, 2023

Currently we have Permissions-Policy: usb=* deployed (equal to nothing).

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 11 0 0.06s
✅ JAVASCRIPT eslint 6 0 0 6.01s
⚠️ MARKDOWN markdownlint 2 0 1 0.91s
✅ MARKDOWN markdown-table-formatter 2 0 0 0.45s
✅ REPOSITORY checkov yes no 46.84s
✅ REPOSITORY git_diff yes no 0.01s
✅ REPOSITORY grype yes no 16.42s
✅ REPOSITORY trivy-sbom yes no 4.25s
✅ REPOSITORY trufflehog yes no 91.24s
✅ TSX eslint 1 0 0 6.1s
✅ TYPESCRIPT eslint 2 0 0 6.5s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

Comment on lines 71 to 72
geolocation=(),
gyroscope=("https://api.sardine.ai"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is annoying for maintenance: Sardine is a dependency of Transak. We won't know when Transak changes their dependencies, or if Sardine started requiring geolocation.

Should we loosen accelerometer,ambient-light-sensor,camera,encrypted-media,geolocation,gyroscope,magnetometer,microphone,publickey-credentials-get,web-share to =*?

Copy link
Member Author

@lukaw3d lukaw3d Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although Transak docs say to put allow="camera;microphone;fullscreen;payment" on iframe, so it's already further restricted 🤷

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say loosen, to avoid maintenance problems.

@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Merging #1583 (ae63a9f) into master (8d13573) will increase coverage by 0.08%.
The diff coverage is n/a.

❗ Current head ae63a9f differs from pull request most recent head 84b30f3. Consider uploading reports for the commit 84b30f3 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1583      +/-   ##
==========================================
+ Coverage   83.01%   83.10%   +0.08%     
==========================================
  Files         157      155       -2     
  Lines        4069     4054      -15     
  Branches      729      728       -1     
==========================================
- Hits         3378     3369       -9     
+ Misses        691      685       -6     
Flag Coverage Δ
cypress 51.12% <ø> (-0.06%) ⬇️
jest 78.25% <ø> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/app/pages/FiatOnramp/index.tsx 0.00% <ø> (ø)

... and 6 files with indirect coverage changes

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 10, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 84b30f3
Status: ✅  Deploy successful!
Preview URL: https://04fe4770.oasis-wallet.pages.dev
Branch Preview URL: https://lw-strict-permissions-policy.oasis-wallet.pages.dev

View logs

@lukaw3d lukaw3d force-pushed the lw/strict-permissions-policy branch from 8ed5ec1 to 84b30f3 Compare August 10, 2023 21:24
@lukaw3d lukaw3d enabled auto-merge August 10, 2023 21:24
@lukaw3d lukaw3d merged commit 51de3ca into master Aug 10, 2023
11 checks passed
@lukaw3d lukaw3d deleted the lw/strict-permissions-policy branch August 10, 2023 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants