-
Notifications
You must be signed in to change notification settings - Fork 549
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
feat: Add Wordpress cataloger #2218
Conversation
05b6371
to
ac62058
Compare
…upport (anchore/syft#2218) in `Syft` Signed-off-by: disc <a.hacicheant@gmail.com>
4fe47a9
to
74382e7
Compare
f65fb39
to
b887018
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@disc I've caught up this branch based on the several changes made on main recently. I have a couple of small questions, otherwise I feel this is about the cross the finish line 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this cataloger 🙌 ! (and thanks for your patience on this PR -- it came in the midst of an API refactor so needed to land afterwards).
@disc A couple of clarifying questions: {
"id": "62595455b80ed7ff",
"name": "Akismet Anti-spam: Spam Protection",
"version": "5.3",
"type": "wordpress-plugin",
"foundBy": "wordpress-plugin-cataloger",
...
"metadata": {
"plugin_name": "akismet",
"author": "Automattic - Anti-spam Team",
"author_uri": "https://automattic.com/wordpress-plugins/"
}
}
(I can make the updates if there are any changes needed) |
e63cc96
to
c314462
Compare
Warning Detected modification or removal of existing json schemas:
|
Hey @wagoodman. Looks like I need to make a few changes after a huge refactor and probably these questions won't be actual further. |
I can help with restoring/regenerating the JSON schema if needed. Also, is the refactor you're referring to one that happened on main (touching the cataloging API)? Or are you talking about a refactor within the new wordpress plugin cataloger you wrote? |
Yes, I meant this one. I've just completed all the needed changes - now need to look into a test run. |
9e68763
to
abe03cb
Compare
Hey, I fixed the failing tests and updated the branch. I still have some questions left (from #2218 (comment))
|
|
It sounds like both answers point to making some small updates -- I can take a stab at it if you'd like? (or if you wanted to that's also alright) |
Signed-off-by: disc <a.hacicheant@gmail.com>
Signed-off-by: disc <a.hacicheant@gmail.com>
Signed-off-by: disc <a.hacicheant@gmail.com>
Added integration test for `wordpress-plugin` Signed-off-by: disc <a.hacicheant@gmail.com>
Signed-off-by: disc <a.hacicheant@gmail.com>
Signed-off-by: disc <a.hacicheant@gmail.com>
Signed-off-by: disc <a.hacicheant@gmail.com>
Signed-off-by: disc <a.hacicheant@gmail.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: disc <a.hacicheant@gmail.com>
Signed-off-by: disc <a.hacicheant@gmail.com>
Signed-off-by: disc <a.hacicheant@gmail.com>
Signed-off-by: disc <a.hacicheant@gmail.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: disc <a.hacicheant@gmail.com>
ebfcc4e
to
3fe58be
Compare
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I force pushed a rebase (there were a few commits from main that didn't belong). I also regenerated the JSON schema after changing the field caps to be consistent with the field convention we use (camel case).
Overall great work -- thanks for taking the time to add this cataloger 🙏 !
* Closes anchore#1911 Wordpress cataloger Signed-off-by: disc <a.hacicheant@gmail.com> * Fixed a few unit tests and static analizer notices Signed-off-by: disc <a.hacicheant@gmail.com> * Updated `README.md` Signed-off-by: disc <a.hacicheant@gmail.com> * Fixed `golangci-lint` notices Added integration test for `wordpress-plugin` Signed-off-by: disc <a.hacicheant@gmail.com> * Fixed `gosimports` notices Signed-off-by: disc <a.hacicheant@gmail.com> * Updated `json schema` version Signed-off-by: disc <a.hacicheant@gmail.com> * Fixed CLI tests, increased expected package count Signed-off-by: disc <a.hacicheant@gmail.com> * Read first 4Kb of a plugins file's content Signed-off-by: disc <a.hacicheant@gmail.com> * replace JSON schema version Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * change wording on source info for wordpress packages Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * Minor changes after a huge refactoring Signed-off-by: disc <a.hacicheant@gmail.com> * Removed unused files Signed-off-by: disc <a.hacicheant@gmail.com> * Updated schema Signed-off-by: disc <a.hacicheant@gmail.com> * Fixed integration tests Signed-off-by: disc <a.hacicheant@gmail.com> * fix integration tests Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * Renamed `metadata.Name` to `metadata.PluginInstallDirectory` Signed-off-by: disc <a.hacicheant@gmail.com> * rename fields to be compliant with json conventions Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: disc <a.hacicheant@gmail.com> Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
…upport (anchore/syft#2218) in `Syft` Signed-off-by: disc <a.hacicheant@gmail.com>
Add a cataloger that detects installed Wordpress plugins by looking files in
*/wp-content/plugins/*
directoriesCloses #1911
Related MR to Grype for removing
wordpress
fromknown
targets and unsuppressing of wordpress plugins vulnerabilitiesanchore/grype#1553