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

Protect: Add Threat History #38117

Merged
merged 22 commits into from
Aug 9, 2024
Merged

Protect: Add Threat History #38117

merged 22 commits into from
Aug 9, 2024

Conversation

nateweller
Copy link
Contributor

@nateweller nateweller commented Jun 28, 2024

Proposed changes:

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

https://github.com/Automattic/jetpack-scan-team/issues/1225

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Ensure all included PRs have been reviewed and approved.
  • Smoke test the Jetpack Protect plugin, specifically the new threat history section.
Copy link
Contributor

github-actions bot commented Jun 28, 2024

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team Review" label and ask someone from your team review the code. Once reviewed, it can then be merged.
If you need an extra review from someone familiar with the codebase, you can update the labels from "[Status] Needs Team Review" to "[Status] Needs Review", and in that case Jetpack Approvers will do a final review of your PR.


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen daily.
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly. The next release is scheduled for September 3, 2024 (scheduled code freeze on September 2, 2024).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Backup plugin:

  • Next scheduled release: none scheduled.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Boost plugin:

  • Next scheduled release: none scheduled.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Search plugin:

  • Next scheduled release: none scheduled.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Social plugin:

  • Next scheduled release: none scheduled.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Starter Plugin plugin:

  • Next scheduled release: none scheduled.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Protect plugin:

  • Next scheduled release: August 12, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Videopress plugin:

  • Next scheduled release: none scheduled.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Migration plugin:

  • Next scheduled release: none scheduled.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Wpcomsh plugin:

  • Next scheduled release: on demand (usually Mondays if not sooner).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@github-actions github-actions bot added the [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. label Jun 28, 2024
@nateweller nateweller changed the base branch from trunk to add/protect-ts July 1, 2024 19:50
@nateweller nateweller force-pushed the add/protect-ts branch 3 times, most recently from 9918244 to d325c06 Compare July 7, 2024 19:28
Copy link
Contributor

github-actions bot commented Jul 7, 2024

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the add/protect-threat-history branch.

  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack add/protect-threat-history
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2
Base automatically changed from add/protect-ts to trunk July 9, 2024 19:56
@nateweller nateweller force-pushed the add/protect-threat-history branch 3 times, most recently from 6f77288 to 998b3b5 Compare July 17, 2024 04:44
@github-actions github-actions bot added [Plugin] Wpcomsh [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. labels Jul 30, 2024
nateweller and others added 21 commits August 9, 2024 12:57
* Add Scan_History class

* changelog

* Update changelog

* Merge trunk, fix versions

* Add initial UI for scan history

* Add firstDetected and fixedOn details to threat cards

* Fix ignored message

* Fix console error

* Adjust wording and styles

* Optimize

* Fix firstDetected and fixedOn property retrieval issues, add todos

* Remove unneeded ref

* Consolidate scan history UI to existing components

* Remove todos

* Return false for scanHistory when upgrade is missing

* Manage ScanPage states when viewing history

* Move source data logic to useProtectData hook

* Improve Summary component Button logic

* ScanPage refactoring

* Reapply missing scanIsUnavailable check

* Add comments

* Hide ignore when viewing threats, and clear history cache when updating or fixing

* Add unignore actions and conditional handling to the UI

* Add null coalescing to core threat prop assignment

* Fix core threat normalization

* Optimizations and refactoring

* Revert standarization, and use conditionals

* Add dummy arg to avoid bad translation minification

* Changlog entry

* Move viewingScanHistory out of initial state

* Use threat status over lack of fixedOn to display unignore button

* Add foundation for unignore request

* Remove need for signature_id

* Add TypeScript support to Jetpack Protect

* Downgrade typescript to 5.0.4, to match other monorepo projects

* Add TypeScript support to Jetpack Protect

* Init feature branch

* Protect: Add Scan_History class (#37903)

* Protect: Add Scan History UI (#37988)

* Init feature branch

* Init feature branch

* Init feature branch

* Use react router for threat history, separate scan and history root components, minor UI adjustments

* changelog

* Add dummy args to avoid bad minification

* Hide scan section navigation when user has no plan

* Wrap ScanButton with forwardRef

* Add onboarding popover to Scan Now button in empty state

* Fix filtering of core threat history

* Redirect to /scan from /scan/history when user has no plan

* Fix animation glitch in onboarding popover

* Remove unnecessary additions

* Further removals after failed base merge

* More removals

* Add todos

* Use status to conditional render unignore action button

* Move ignore/unignore actions to dedicated modals

* Add TypeScript support to Jetpack Protect

* Downgrade typescript to 5.0.4, to match other monorepo projects

* Add TypeScript support to Jetpack Protect

* Init feature branch

* Protect: Add Scan_History class (#37903)

* Protect: Add Scan History UI (#37988)

* changelog

* Protect: Separate scanner and history views via React Router and UI adjustments (#38325)

* Run ./tools/fixup-project-versions.sh

* Restore project versions

* Run ./tools/fixup-project-versions.sh

* Remove todo comment (#38628)

* Remove changelog

* Display fix threat button only for current threats

* Further unification

* Refresh scan history after unignore

* Update projects/plugins/protect/src/js/components/unignore-threat-modal/index.jsx

Co-authored-by: Nate Weller <nate.weller@automattic.com>

* Fix lint errors

---------

Co-authored-by: Nate Weller <hello@nateweller.com>
Co-authored-by: Nate Weller <nate.weller@automattic.com>
@nateweller nateweller merged commit b7a5de7 into trunk Aug 9, 2024
71 checks passed
@nateweller nateweller deleted the add/protect-threat-history branch August 9, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Protect Models [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Migration [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Starter Plugin [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Plugin] Wpcomsh
2 participants