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

clarify browser_plugins table is referencing basically unsupported CNPAPI tech #7651

Merged
merged 2 commits into from
Jun 30, 2022

Conversation

zhumo
Copy link
Contributor

@zhumo zhumo commented Jun 24, 2022

Problem

The naming of the table browser_plugins is pretty expansive. As a newbie, I thought I could just query it for everything! Turns out there are browser-specific tables and this table, despite it's name, references tech that is no longer supported across major browsers (https://en.wikipedia.org/wiki/NPAPI#Support).

This PR adds some language around that to try alleviate the potential confusion and also communicate to the user that the CNPAPI is widely no longer supported.

Broader considerations

Maybe this is a first step towards getting rid of this table?

Copy link
Member

@directionless directionless left a comment

Choose a reason for hiding this comment

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

Broadly speaking this seems fine, though I have some word quibbles.

If you wanted to make this a bit more expansive, we could consider some metadata about deprecated tables and think about how to bubble it up.

@@ -1,5 +1,5 @@
table_name("browser_plugins")
description("All C/NPAPI browser plugin details for all users.")
description("All C/NPAPI browser plugin details for the user context. C/NPAPI has been deprecated on all major browsers. To query for plugins on modern browsers, try: `chrome_extensions` `firefox_addons` `safari_extensions`.")
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure what "for the user context means", so I don't think this adds clarity.

As a side note, I think the safari_extension table might also be somewhat out of date

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's not something I know exactly how to communicate.

What I'm trying to convey with the "user context" thing is that user_data=True in the attributes below. I think userData=True means that it's untrue that it returns "plugin details for all users" as it currently says, right?

Not exactly sure how to communicate that clearly... The osquery wiki states:

**user_data=True**: This tells the caller that they should provide a `uid` in the query predicate. By default the table will inspect the current user's content, but may be asked to include results from others.

Maybe to be standard, we ought to use that language here? "plugin details for the current user's content."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any idea what's wrong with the safari table? Could be documented too.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should mention anything about user_data here. It feels too ad-hoc. I think it would make more sense to figure out a uniform approach

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I will change

@zhumo
Copy link
Contributor Author

zhumo commented Jun 24, 2022

@directionless yes! I think we could have some attribute that's like deprecationMessage="adsfasdf" which then maybe renders on the schema?

That's a bit more complex and I am gone for the next two weeks. I was thinking this is an interim solution (and the note about using the browser-specific tables might be useful separate from deprecation anyway).

@directionless
Copy link
Member

@directionless yes! I think we could have some attribute that's like deprecationMessage="adsfasdf" which then maybe renders on the schema?

That's a bit more complex and I am gone for the next two weeks. I was thinking this is an interim solution (and the note about using the browser-specific tables might be useful separate from deprecation anyway).

My thought exactly. Also, that it's complex

Copy link
Member

@directionless directionless left a comment

Choose a reason for hiding this comment

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

Probably good enough.

@Smjert
Copy link
Member

Smjert commented Jun 30, 2022

@directionless @zhumo I'm going to merge this, while I've tracked the desire for marking deprecated tables here: #7666

@Smjert Smjert merged commit cfe330e into osquery:master Jun 30, 2022
@zhumo zhumo deleted the clarify-cnpapi-browser-extensions-table branch July 11, 2022 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants