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 object_src Content-Security-Policy directive #23001

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

Fryguy
Copy link
Member

@Fryguy Fryguy commented Apr 23, 2024

@jrafanie Please review.

While we have set default_src to 'self', some scanners want to see each field explicitly called out anyway, so this PR adds in the missing object_src directive.

see apache changes:

@miq-bot
Copy link
Member

miq-bot commented Apr 23, 2024

Checked commits Fryguy/manageiq@04ceead~...f5a6995 with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. 🍪

@kbrock
Copy link
Member

kbrock commented Apr 24, 2024

of note around headers:

  gem "secure_headers",                 "~>3.9"

the current version is 6.5

@Fryguy Fryguy assigned kbrock and unassigned jrafanie Apr 24, 2024
Copy link
Member

@kbrock kbrock left a comment

Choose a reason for hiding this comment

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

I've verified that the only change to the response (used http://localhost:3000/ ) was the addition of a header:

Content-Security-Policy::
object-src 'self'; 

Final result:

Content-Security-Policy: default-src 'self'; child-src 'self';
connect-src 'self' fonts.gstatic.com ws://localhost:3000;
font-src 'self' fonts.gstatic.com fonts.googleapis.com;
img-src 'self' data:; object-src 'self';
script-src 'unsafe-eval' 'unsafe-inline' 'self';
style-src 'unsafe-inline' 'self'

kbrock added a commit to kbrock/manageiq-appliance that referenced this pull request Apr 25, 2024
@kbrock kbrock merged commit 10d41d6 into ManageIQ:master Apr 25, 2024
8 checks passed
@Fryguy Fryguy deleted the object_src branch April 26, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants