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

update logic + config management refactor #3567

Merged
merged 13 commits into from
Apr 19, 2023
Merged

Conversation

tarunKoyalwar
Copy link
Member

@tarunKoyalwar tarunKoyalwar commented Apr 18, 2023

Proposed Changes

  • replace old version check endpoint with new pdtm version check endpoint
  • uses standard/default tool self update logic from utils/update + shows release notes on update
  • config management refactor (Ref: centralized nuclei config management #3572)
  • update logic refactor
    • template update/ install logic is done from internal.installer package which uses most of existing logic from utils/update
    • centrailized template management with templateManager
    • ref: use utils/update for updates #3428
// package install provides helper functions for all download and installation of following tasks:
// 1. downloading and install nuclei templates
// 2. download and update nuclei binary (i.e self update)
// 3. version check for nuclei binary & templates
  • based on update utils refactor and improvements utils#131
    • Nuclei now properly handles update logic if nuclei is installed from dev branch

    If installed tool is from dev branch ex: v2.9.1-dev it is flaged as outdated and available for update if v2.9.1 is released

@tarunKoyalwar tarunKoyalwar self-assigned this Apr 18, 2023
@tarunKoyalwar tarunKoyalwar changed the title issue 3428 update refactor config + update refactor Apr 18, 2023
@ehsandeep ehsandeep linked an issue Apr 18, 2023 that may be closed by this pull request
@tarunKoyalwar tarunKoyalwar changed the title config + update refactor update logic + config management refactor Apr 19, 2023
@tarunKoyalwar tarunKoyalwar marked this pull request as ready for review April 19, 2023 15:37
@tarunKoyalwar
Copy link
Member Author

  • all config related stuff is available at v2/pkg/catalog/config
  • all template management stuff is available at v2/internal/installer

@tarunKoyalwar
Copy link
Member Author

Screenshot 2023-04-19 at 9 11 36 PM
Screenshot 2023-04-19 at 9 11 46 PM

Copy link
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

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

lgtm - suggesting minor change for string comparison

v2/cmd/nuclei/main.go Outdated Show resolved Hide resolved
@tarunKoyalwar tarunKoyalwar mentioned this pull request Apr 19, 2023
4 tasks
@ehsandeep ehsandeep merged commit bf08913 into dev Apr 19, 2023
10 of 11 checks passed
@ehsandeep ehsandeep deleted the issue-3428-update-refactor branch April 19, 2023 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants