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

Add support for 'privileged' search #19120

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nrathaus
Copy link
Contributor

@nrathaus nrathaus commented Apr 21, 2024

Resolves #18990

@cgranleese-r7 cgranleese-r7 added enhancement rn-enhancement release notes enhancement labels Apr 22, 2024
@cgranleese-r7
Copy link
Contributor

Hi @nrathaus thanks for all the recent contributions 🚀

I thought I'd add a few things we like to do/see when contributing. It's super helpful for everyone involved if contributors follow the pull request template. Just a brief description of what the changes are and why they were needed, replication and verification steps for the testing you completed when verifying the change.

This is will help us work towards making sure all bases are covered in terms of testing path, and with the project being a long running open source project, it is also super helpful for future traveler's when changes are well documented with a good paper trail to reference back to.

@nrathaus
Copy link
Contributor Author

Isn't linking to the original Issue sufficient here? @cgranleese-r7

nrathaus and others added 2 commits April 22, 2024 14:49
Co-authored-by: cgranleese-r7 <69522014+cgranleese-r7@users.noreply.github.com>
Co-authored-by: cgranleese-r7 <69522014+cgranleese-r7@users.noreply.github.com>
@nrathaus
Copy link
Contributor Author

@cgranleese-r7 how can I get the modules_metadata updated with the privileged attribute?

Is there a way to populate the JSON file?

@cgranleese-r7
Copy link
Contributor

Isn't linking to the original Issue sufficient here? @cgranleese-r7

No, due to the points I have listed above it is much more beneficial to make use of our template.

@cgranleese-r7 how can I get the modules_metadata updated with the privileged attribute?
Is there a way to populate the JSON file?

If I'm understanding what you're asking, I believe that will be done automatically once the PR is merged.

@nrathaus
Copy link
Contributor Author

@cgranleese-r7 The 'privileged' field information is read from the modules_metadata.json file that is either the version under ~/.msf4/store/ or the one shipped with the metasploit db/modules_metadata_base.json

@adfoster-r7
Copy link
Contributor

Thanks for the PR! I think the code changes in isolation are good, but I think the privileged metadata that's exposed on our datamodel is ambiguous in its definition. It looks like it can mean one of two things:

  #
  # Returns whether or not the module requires or grants high privileges.
  #
  def privileged?
    privileged == true
  end

Because of this ambiguity in definition, i.e. the module either requiring or granting privileges, I'm not sure if exposing these values to the user is beneficial in its current state

I'm wondering if we might need to do some pre-requisite work to split this one value into two? i.e. privileges_required and grants_privileges or something? That might be useful so users could search for exactly what they want 🤔

@nrathaus
Copy link
Contributor Author

  1. We need to decide if we add support (non-ambiguous, or ambiguous privileged) or we don't

  2. Then we need to decide non-ambiguous/ambiguous way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement rn-enhancement release notes enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "privileged" to supported search columns
3 participants