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

Issue 434843002: Only allow --install-chrome-app to install apps. (Closed)

Created:
6 years, 4 months ago by jackhou1
Modified:
6 years, 4 months ago
Reviewers:
tapted, gab
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, asargent_no_longer_on_chrome
Project:
chromium
Visibility:
Public.

Description

Only allow --install-chrome-app to install apps. This prevents --install-chrome-app from being used to install malicious extensions. BUG=341353 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287261

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address comments #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -6 lines) Patch
M chrome/browser/apps/install_chrome_app.cc View 1 3 chunks +42 lines, -6 lines 3 comments Download

Messages

Total messages: 15 (0 generated)
jackhou1
6 years, 4 months ago (2014-08-01 04:29:49 UTC) #1
tapted
lgtm % nits (assuming the restriction shouldn't just be platform apps -- hosted apps and ...
6 years, 4 months ago (2014-08-01 05:02:38 UTC) #2
jackhou1
Yeah, I think allowing hosted and legacy apps is fine too, since they can't affect ...
6 years, 4 months ago (2014-08-01 05:26:44 UTC) #3
jackhou1
The CQ bit was checked by jackhou@chromium.org
6 years, 4 months ago (2014-08-01 05:26:54 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jackhou@chromium.org/434843002/20001
6 years, 4 months ago (2014-08-01 05:27:57 UTC) #5
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium.win ...
6 years, 4 months ago (2014-08-01 14:03:23 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-01 16:14:22 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel/builds/2327)
6 years, 4 months ago (2014-08-01 16:14:23 UTC) #8
jackhou1
The CQ bit was checked by jackhou@chromium.org
6 years, 4 months ago (2014-08-03 12:32:44 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jackhou@chromium.org/434843002/20001
6 years, 4 months ago (2014-08-03 12:33:19 UTC) #10
commit-bot: I haz the power
Change committed as 287261
6 years, 4 months ago (2014-08-03 14:45:46 UTC) #11
gab
Thanks, one question below. https://codereview.chromium.org/434843002/diff/20001/chrome/browser/apps/install_chrome_app.cc File chrome/browser/apps/install_chrome_app.cc (right): https://codereview.chromium.org/434843002/diff/20001/chrome/browser/apps/install_chrome_app.cc#newcode63 chrome/browser/apps/install_chrome_app.cc:63: if (!manifest()->HasKey(extensions::manifest_keys::kApp)) { Does this ...
6 years, 4 months ago (2014-08-04 18:00:23 UTC) #12
jackhou1
https://codereview.chromium.org/434843002/diff/20001/chrome/browser/apps/install_chrome_app.cc File chrome/browser/apps/install_chrome_app.cc (right): https://codereview.chromium.org/434843002/diff/20001/chrome/browser/apps/install_chrome_app.cc#newcode63 chrome/browser/apps/install_chrome_app.cc:63: if (!manifest()->HasKey(extensions::manifest_keys::kApp)) { On 2014/08/04 18:00:23, gab wrote: > ...
6 years, 4 months ago (2014-08-05 01:25:25 UTC) #13
gab
Anthony, PTAL at my question below. Thanks! Gab https://codereview.chromium.org/434843002/diff/20001/chrome/browser/apps/install_chrome_app.cc File chrome/browser/apps/install_chrome_app.cc (right): https://codereview.chromium.org/434843002/diff/20001/chrome/browser/apps/install_chrome_app.cc#newcode63 chrome/browser/apps/install_chrome_app.cc:63: if ...
6 years, 4 months ago (2014-08-05 12:40:51 UTC) #14
asargent_no_longer_on_chrome
6 years, 4 months ago (2014-08-06 20:46:38 UTC) #15
Sorry for delay in responding.

You can see which permissions, APIs, and manifest-controlled features are
available to extensions, V1 packaged apps (essentially just extensions with
a launch icon), hosted apps, and V2 packaged apps by looking at the
"extension_types" fields in these files:

chrome/common/extensions/api/_api_features.json
chrome/common/extensions/api/_manifest_features.json
chrome/common/extensions/api/_permission_features.json

extensions/common/api/_api_features.json
extensions/common/api/_manifest_features.json
extensions/common/api/_permission_features.json

("legacy_packaged_app" means V1 packaged app, and "platform_app" means V2
packaged app)

The reason we have two copies of these is that there is an ongoing project
to extract as many of the APIs as possible into the extensions/ top-level
component, but it isn't finished yet.




On Tue, Aug 5, 2014 at 5:40 AM, <gab@chromium.org> wrote:

> Anthony, PTAL at my question below.
>
> Thanks!
> Gab
>
>
> https://codereview.chromium.org/434843002/diff/20001/
> chrome/browser/apps/install_chrome_app.cc
> File chrome/browser/apps/install_chrome_app.cc (right):
>
> https://codereview.chromium.org/434843002/diff/20001/
> chrome/browser/apps/install_chrome_app.cc#newcode63
> chrome/browser/apps/install_chrome_app.cc:63: if
> (!manifest()->HasKey(extensions::manifest_keys::kApp)) {
> On 2014/08/05 01:25:25, jackhou1 wrote:
>
>> On 2014/08/04 18:00:23, gab wrote:
>> > Does this manifest come from the third-party provided manifest? If
>>
> so, how
>
>> will
>> > this help against malicious side-loading (i.e., if they can just
>>
> write this
>
>> bit
>> > in their manifest?).
>>
>
>  This manifest comes from the webstore. I'd assume the manifest
>>
> uploaded by a
>
>> third party is sufficiently validated by webstore, but I can double
>>
> check if
>
>> there's any doubt.
>>
>
> OKay, I think this will be true in M38, +asargent to confirm.
>
>
>  Also, I believe manifest_keys::kApp is how we determine whether an
>>
> extension is
>
>> an app. So if the manifest contains a valid "app" key, we would treat
>>
> it like an
>
>> app and it would not get to extension-only APIs.
>>
>
> Okay cool, do you know where I can find a list of APIs that are
> extension-only? (or even better a whitelist of those that are allowed
> for apps?)
>
>
>
> https://code.google.com/p/chromium/codesearch#chromium/
> src/extensions/common/manifest.cc&l=119
>
> https://codereview.chromium.org/434843002/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698