Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Issue 2784753003: CSP: Enable whitelisting of external JavaScript via hashes (Closed)

Created:
3 years, 8 months ago by Marc Treib
Modified:
3 years, 8 months ago
Reviewers:
Mike West
CC:
blink-reviews, blink-reviews-frames_chromium.org, blink-worker-reviews_chromium.org, chromium-reviews, falken+watch_chromium.org, horo+watch_chromium.org, kinuko+worker_chromium.org, shimazu+worker_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : webkit_unit_tests builds #

Total comments: 8

Patch Set 3 : don't support sha1, add comment, rebase #

Patch Set 4 : unit test #

Patch Set 5 : rebase #

Total comments: 5

Patch Set 6 : review #

Patch Set 7 : layout test #

Patch Set 8 : unit_tests++ #

Total comments: 5

Patch Set 9 : review #

Total comments: 2

Patch Set 10 : add tests for whitelisted host #

Total comments: 2

Patch Set 11 : remove duplicate test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+309 lines, -33 lines) Patch
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/crossoriginScript.js View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/crossoriginScript.js.headers View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/externalScript.js View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/script-src-sri_hash.sub.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +104 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/script-src-sri_hash.sub.html.sub.headers View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h View 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp View 1 2 3 chunks +55 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp View 1 2 3 4 5 6 7 8 chunks +108 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp View 1 2 3 4 6 chunks +10 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp View 1 8 chunks +16 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 49 (25 generated)
Marc Treib
PTApreliminaryL! This is clearly not ready for submission, but I think it's good enough for ...
3 years, 8 months ago (2017-03-29 11:19:32 UTC) #2
Mike West
That was pretty damn fast! I think you can clean up a little duplication of ...
3 years, 8 months ago (2017-03-29 13:03:54 UTC) #3
Mike West
(Tie this to bug 706380, please.) (Also, if you want to chat about tests, I'm ...
3 years, 8 months ago (2017-03-29 13:09:27 UTC) #4
Mike West
On 2017/03/29 at 13:09:27, Mike West wrote: > (Tie this to bug 706380, please.) (Also ...
3 years, 8 months ago (2017-03-29 13:29:37 UTC) #5
Marc Treib
On 2017/03/29 13:29:37, Mike West wrote: > On 2017/03/29 at 13:09:27, Mike West wrote: > ...
3 years, 8 months ago (2017-03-30 08:30:31 UTC) #7
Marc Treib
https://codereview.chromium.org/2784753003/diff/20001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp File third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp (right): https://codereview.chromium.org/2784753003/diff/20001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp#newcode48 third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp:48: ContentSecurityPolicyHashAlgorithm convertHashAlgorithmToCSPHashAlgorithm( On 2017/03/29 13:03:54, Mike West wrote: > ...
3 years, 8 months ago (2017-03-30 09:48:51 UTC) #8
Mike West
Got it. Ok, thanks! Let's get some tests in, and we're good to go!
3 years, 8 months ago (2017-03-30 10:10:53 UTC) #10
Mike West
On 2017/03/30 at 10:10:53, Mike West (OOO until 4th) wrote: > Got it. Ok, thanks! ...
3 years, 8 months ago (2017-04-04 12:13:09 UTC) #11
Marc Treib
On 2017/04/04 12:13:09, Mike West (OOO until 4th) wrote: > On 2017/03/30 at 10:10:53, Mike ...
3 years, 8 months ago (2017-04-04 12:15:19 UTC) #14
Mike West
On 2017/04/04 at 12:15:19, treib wrote: > On 2017/04/04 12:13:09, Mike West (OOO until 4th) ...
3 years, 8 months ago (2017-04-04 13:59:46 UTC) #17
Marc Treib
https://codereview.chromium.org/2784753003/diff/80001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp File third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp (right): https://codereview.chromium.org/2784753003/diff/80001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp#newcode351 third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp:351: << "List: `" << test.list << "`, URL: `" ...
3 years, 8 months ago (2017-04-04 14:17:21 UTC) #18
Marc Treib
https://codereview.chromium.org/2784753003/diff/80001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp File third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp (right): https://codereview.chromium.org/2784753003/diff/80001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp#newcode363 third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp:363: EXPECT_EQ(test.expected, On 2017/04/04 14:17:21, Marc Treib wrote: > On ...
3 years, 8 months ago (2017-04-04 14:29:49 UTC) #19
Mike West
On 2017/04/04 at 14:29:49, treib wrote: > https://codereview.chromium.org/2784753003/diff/80001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp > File third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp (right): > > https://codereview.chromium.org/2784753003/diff/80001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp#newcode363 ...
3 years, 8 months ago (2017-04-04 14:43:35 UTC) #20
Marc Treib
On 2017/04/04 14:43:35, Mike West (OOO until 4th) wrote: > On 2017/04/04 at 14:29:49, treib ...
3 years, 8 months ago (2017-04-04 15:01:50 UTC) #21
Marc Treib
I've added a first layout test, PTAL! How much coverage do we want here? There's ...
3 years, 8 months ago (2017-04-05 10:07:08 UTC) #22
Mike West
This is great, Marc! Thanks! I would like to see more of the unit tests ...
3 years, 8 months ago (2017-04-06 10:26:35 UTC) #31
Marc Treib
https://codereview.chromium.org/2784753003/diff/140001/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/externalScript.js File third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/externalScript.js (right): https://codereview.chromium.org/2784753003/diff/140001/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/externalScript.js#newcode1 third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/externalScript.js:1: externalRan = true; On 2017/04/06 10:26:35, Mike West (OOO ...
3 years, 8 months ago (2017-04-06 12:26:31 UTC) #32
Marc Treib
https://codereview.chromium.org/2784753003/diff/140001/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/script-src-sri_hash.html File third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/script-src-sri_hash.html (right): https://codereview.chromium.org/2784753003/diff/140001/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/script-src-sri_hash.html#newcode48 third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/script-src-sri_hash.html:48: </script> On 2017/04/06 12:26:30, Marc Treib wrote: > On ...
3 years, 8 months ago (2017-04-06 16:21:42 UTC) #34
Mike West
LGTM! Thank you!
3 years, 8 months ago (2017-04-07 08:58:29 UTC) #37
Marc Treib
Thanks Mike! Any advice on the parser-inserted-script test? Tagged with comments below. https://codereview.chromium.org/2784753003/diff/180001/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/script-src-sri_hash.sub.html File third_party/WebKit/LayoutTests/external/wpt/content-security-policy/script-src/script-src-sri_hash.sub.html ...
3 years, 8 months ago (2017-04-07 09:03:26 UTC) #38
Mike West
If there's only one test using the global, then that seems fine? I think the ...
3 years, 8 months ago (2017-04-07 16:03:42 UTC) #43
Marc Treib
On 2017/04/07 16:03:42, Mike West (OOO until 4th) wrote: > If there's only one test ...
3 years, 8 months ago (2017-04-07 16:12:07 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2784753003/200001
3 years, 8 months ago (2017-04-07 16:12:45 UTC) #46
commit-bot: I haz the power
3 years, 8 months ago (2017-04-07 16:19:37 UTC) #49
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/95c2d0890691fd854623b81bdd12...

Powered by Google App Engine
This is Rietveld 408576698