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

CSP header adjustments #3068

Merged
merged 4 commits into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Added
### Changed
* Changed default Content-Security-Policy (CSP) Header to
`default-src 'self'; script-src 'self'; style-src-elem 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' blob:;`
[#3068](https://github.com/greenbone/gsa/pull/3068)

### Deprecated
### Removed
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion gsa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"test:coverage": "react-scripts test --coverage --maxWorkers 2",
"lint": "eslint --max-warnings 0 src",
"start": "react-scripts start",
"build": "react-scripts build",
"build": "INLINE_RUNTIME_CHUNK=false react-scripts build",
"eject": "react-scripts eject",
"storybook": "NODE_PATH=src start-storybook",
"build-storybook": "NODE_PATH=src build-storybook",
Expand Down
10 changes: 6 additions & 4 deletions gsad/src/gsad.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,11 @@
* @brief Default value for HTTP header "Content-Security-Policy"
*/
#define DEFAULT_GSAD_CONTENT_SECURITY_POLICY \
"default-src 'self' 'unsafe-inline';" \
" img-src 'self' blob:;" \
" frame-ancestors 'self'"
"default-src 'self'; " \
"script-src 'self'; " \
"style-src-elem 'self' 'unsafe-inline'; " \
"style-src 'self' 'unsafe-inline'; " \
"img-src 'self' blob:;"

/**
* @brief Default "max-age" for HTTP header "Strict-Transport-Security"
Expand All @@ -172,7 +174,7 @@
#define DEFAULT_GSAD_PER_IP_CONNECTION_LIMIT 30

#define COPYRIGHT \
"Copyright (C) 2010 - 2020 Greenbone Networks GmbH\n" \
"Copyright (C) 2010 - 2021 Greenbone Networks GmbH\n" \
"License: AGPL-3.0-or-later\n" \
"This is free software: you are free to change and redistribute it.\n" \
"There is NO WARRANTY, to the extent permitted by law.\n\n"
Expand Down