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

chrome_extensions: Add the profile name to the table #5213

Closed
wants to merge 2 commits into from
Closed

chrome_extensions: Add the profile name to the table #5213

wants to merge 2 commits into from

Conversation

alessandrogario
Copy link
Member

@alessandrogario alessandrogario commented Sep 13, 2018

This PR adds a new column to the chrome_extensions table named profile, used to show the name of the Chrome profile that owns each extension.

osqueryi --verbose 'SELECT profile, name, version FROM chrome_extensions;'
+---------------+---------------------+--------------+
| profile       | name                | version      |
+---------------+---------------------+--------------+
| trail_of_bits | Slides              | 0.10         |
| trail_of_bits | Docs                | 0.10         |
| trail_of_bits | Google Drive        | 14.1         |
| trail_of_bits | YouTube             | 4.2.8        |
| trail_of_bits | Sheets              | 1.2          |
| trail_of_bits | HTTPS Everywhere    | 2018.8.22    |
| trail_of_bits | Google Docs Offline | 1.7          |
| trail_of_bits | __MSG_APP_NAME__    | 1.0.0.4      |
| trail_of_bits | Gmail               | 8.1          |
| trail_of_bits | Chrome Media Router | 6818.528.0.0 |
| Person 1      | Slides              | 0.10         |
| Person 1      | Docs                | 0.10         |
| Person 1      | Google Drive        | 14.1         |
| Person 1      | YouTube             | 4.2.8        |
| Person 1      | Sheets              | 1.2          |
| Person 1      | Google Docs Offline | 1.7          |
| Person 1      | __MSG_APP_NAME__    | 1.0.0.4      |
| Person 1      | Gmail               | 8.1          |
| Person 1      | Chrome Media Router | 6818.528.0.0 |
+---------------+---------------------+--------------+

@facebook-github-bot facebook-github-bot added the cla signed Automated label: Pull Request author has signed the osquery CLA label Sep 13, 2018
@guliashvili guliashvili self-assigned this Sep 13, 2018
@guliashvili guliashvili self-requested a review September 13, 2018 12:13
std::string profile_name;
auto status = getChromeProfileName(profile_name, profile_path);
if (!status.ok()) {
LOG(WARNING) << status.getMessage();
Copy link
Contributor

Choose a reason for hiding this comment

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

May I ask you to add a prefix for this log line? Smth like: "Getting chrome profile name failed: " ?


const auto& profile_obj = tree.get_child_optional(kProfilePreferenceKey);
if (!profile_obj) {
return Status(1, "The following profile is malformed: " + path.string());
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: you could use a bit more self descriptive form of creating status with error:

return Status::failure(...);

If you like so :)

@guliashvili
Copy link
Contributor

ok to test

@guliashvili
Copy link
Contributor

Hi @alessandrogario
If you could rebase it on experimental, I will merge it soon.

@alessandrogario alessandrogario changed the base branch from master to experimental January 15, 2019 11:40
@alessandrogario
Copy link
Member Author

Hello @guliashvili !

I've updated the PR to target experimental! Thanks for looking into this patch!

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@guliashvili has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

@guliashvili merged this pull request in 507638d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed Automated label: Pull Request author has signed the osquery CLA Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants