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

Issue 2474903002: Part 3.1: Is policy list subsumed under subsuming policy? (Closed)

Created:
4 years, 1 month ago by amalika
Modified:
4 years ago
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Part 3.1: Is policy list subsumed under subsuming policy? This is part of an experimental feature Embedding-CSP. This patch introduces CSPDirectiveList subsumption. We aggregate SourceListDirectives based on their directive names (or default directives otherwise) to check if it subsumes under the embedding csp. Note: There is only one SourceListDirective for each directive name type specified by Embedding CSP since it specifies only one policy. + We only consider scheme source /host source expressions to this point. Separate patches will be devoted to consideration of 'unsafe-inline' etc. BUG=647588 Committed: https://crrev.com/0dc68f9f6acad85dd6ffcd2de5332574f886d061 Cr-Commit-Position: refs/heads/master@{#434667}

Patch Set 1 : Comments #

Total comments: 8

Patch Set 2 : More tests + simplyfying getSourceList #

Total comments: 4

Patch Set 3 : Simplyfying getSourceVector #

Total comments: 2

Patch Set 4 : Rebasing on enums changes #

Total comments: 13

Patch Set 5 : OperativeDirective test + other changes based on reviews #

Total comments: 6

Patch Set 6 : Adding one more check on defaulting in tests #

Total comments: 1

Patch Set 7 : Rebasing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+445 lines, -2 lines) Patch
M third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h View 1 2 3 4 5 3 chunks +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp View 1 2 3 4 1 chunk +97 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp View 1 2 3 4 5 6 1 chunk +323 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPSource.h View 1 2 3 4 5 6 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/SourceListDirective.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (22 generated)
amalika
Next level: CSPDirectiveList. Point of consideration: how to decrease the `getSourceList` method?
4 years, 1 month ago (2016-11-11 16:01:24 UTC) #11
Mike West
A few quick comments, mostly about the tests. Sorry. Buried today. https://codereview.chromium.org/2474903002/diff/120001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp File third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp (right): ...
4 years, 1 month ago (2016-11-14 14:21:23 UTC) #12
amalika
Updated! Also, should csp3 directives be added such as `manifest-src` and `worker-src`? The former is ...
4 years, 1 month ago (2016-11-15 13:17:18 UTC) #13
Mike West
I think this is looking good, but I'd like the tests to be clearer. I'll ...
4 years, 1 month ago (2016-11-17 11:25:16 UTC) #14
amalika
This patch is still independent of changes in "Embedding-CSP: Refactoring directive strings into enum" https://codereview.chromium.org/2516383002, ...
4 years, 1 month ago (2016-11-21 15:57:06 UTC) #16
Mike West
I think an enum is the right way to go. One comment other than that. ...
4 years, 1 month ago (2016-11-23 11:19:02 UTC) #17
amalika
Rebased on DirectiveType enum changes https://codereview.chromium.org/2474903002/diff/200001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp File third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp (right): https://codereview.chromium.org/2474903002/diff/200001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp#newcode1167 third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp:1167: SourceListDirective* CSPDirectiveList::operativeDirective( Not sure ...
4 years ago (2016-11-23 13:57:11 UTC) #18
Mike West
Thanks! https://codereview.chromium.org/2474903002/diff/200001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp File third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp (right): https://codereview.chromium.org/2474903002/diff/200001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp#newcode1167 third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp:1167: SourceListDirective* CSPDirectiveList::operativeDirective( On 2016/11/23 at 13:57:11, amalika wrote: ...
4 years ago (2016-11-24 13:07:46 UTC) #19
amalika
https://codereview.chromium.org/2474903002/diff/200001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp File third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp (right): https://codereview.chromium.org/2474903002/diff/200001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp#newcode1167 third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp:1167: SourceListDirective* CSPDirectiveList::operativeDirective( On 2016/11/24 at 13:07:46, Mike West (slow) ...
4 years ago (2016-11-24 14:32:29 UTC) #21
Mike West
LGTM % nits and small comments. Thanks! https://codereview.chromium.org/2474903002/diff/240001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h File third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h (right): https://codereview.chromium.org/2474903002/diff/240001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h#newcode277 third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h:277: // Tthis ...
4 years ago (2016-11-24 14:37:37 UTC) #22
amalika
https://codereview.chromium.org/2474903002/diff/240001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h File third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h (right): https://codereview.chromium.org/2474903002/diff/240001/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h#newcode277 third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h:277: // Tthis function returns a SourceListDirective of that type ...
4 years ago (2016-11-24 15:38:20 UTC) #23
Mike West
Land it. :)
4 years ago (2016-11-24 15:43:08 UTC) #24
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/2474903002/260001
4 years ago (2016-11-25 11:35:22 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: blimp_linux_dbg on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/blimp_linux_dbg/builds/38988)
4 years ago (2016-11-25 11:37:26 UTC) #29
Mike West
Looks like this needs a rebase.
4 years ago (2016-11-28 07:10:38 UTC) #30
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/2474903002/280001
4 years ago (2016-11-28 15:29:22 UTC) #36
commit-bot: I haz the power
Committed patchset #7 (id:280001)
4 years ago (2016-11-28 16:47:35 UTC) #38
commit-bot: I haz the power
4 years ago (2016-11-28 16:52:03 UTC) #40
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/0dc68f9f6acad85dd6ffcd2de5332574f886d061
Cr-Commit-Position: refs/heads/master@{#434667}

Powered by Google App Engine
This is Rietveld 408576698