Skip to content

Jetpack Mobile: Scan - ThreatItem#13646

Merged
malinajirka merged 10 commits intodevelopfrom
issue/13329-threat-item
Dec 23, 2020
Merged

Jetpack Mobile: Scan - ThreatItem#13646
malinajirka merged 10 commits intodevelopfrom
issue/13329-threat-item

Conversation

@ashiagr
Copy link
Copy Markdown
Contributor

@ashiagr ashiagr commented Dec 21, 2020

Parent: #13326

This PR builds threat item state with header + sub header based on different threat types and click listener that will take it to the threat details screen later on.

To test

Prerequisite: Make sure both Scan feature flag and MySiteImprovements flag are set to on in the App settings.

  1. Select a site with scan capability on the My Site tab
  2. Notice that scan menu is displayed
  3. Click scan menu item
  4. Notice that threat items are displayed with header and sub header based on threat types as described in the below table:
    (Tests included in ThreatItemBuilderTest)

References: Calypso's header & sub header( 1, 2)

Threat Type Header SubHeader
CoreFileModification {filename}: infected core file Vulnerability found in WordPress
Database Database {rows.size} threats -
File {filename}: malicious code pattern Threat found {signature}
VulnerableExtension.ExtensionType.Plugin Vulnerable Plugin: {slug} (version {version}) Vulnerability found in plugin
VulnerableExtension.ExtensionType.Theme Vulnerable Theme: {slug} (version {version}) Vulnerability found in theme
Generic Threat found Miscellaneous vulnerability

Note

  1. Ignore all styling
  2. Not too much detailing is done for the messages e.g. customising FileThreatModel's SubHeader based on threat status (current/fixed/ignored)

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@ashiagr ashiagr added this to the 16.5 milestone Dec 21, 2020
@ashiagr ashiagr requested a review from malinajirka December 21, 2020 12:01
@ashiagr ashiagr self-assigned this Dec 21, 2020
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Dec 21, 2020

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Dec 21, 2020

You can test the changes on this Pull Request by downloading the APK here.

@ashiagr ashiagr requested review from malinajirka and removed request for malinajirka December 21, 2020 12:08
@malinajirka malinajirka self-assigned this Dec 22, 2020
Copy link
Copy Markdown
Contributor

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

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

Thanks @ashiagr! Great job on exploring the web implementation. It looks great overall. I left one important comment and a couple of minor comments.

Some issues I found - not related to this PR, but I thought I'd better mention them so we can add them to backlog, if they are not already there.
Issue 1:
First time I open "Scan" menu item after turning on the flag, the screen content is blank (I can see just AppBar title).

Issue 2:

  1. Open scan feature for SiteA
  2. Switch to SiteB
  3. Open scan feature for SiteB -> state for SiteA appears for 1-2 seconds

@ashiagr ashiagr mentioned this pull request Dec 23, 2020
67 tasks
@ashiagr
Copy link
Copy Markdown
Contributor Author

ashiagr commented Dec 23, 2020

Thanks for the review @malinajirka! I've addressed your comments and added these issues in the backlog #13326 under known issues.

Ready for another round 🙇‍♀️.

PS> I'll assign @zwarm as reviewer tomm., enjoy your 🎄 vacations!

Copy link
Copy Markdown
Contributor

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the changes @ashiagr ;)

@malinajirka malinajirka merged commit 99b935f into develop Dec 23, 2020
@malinajirka malinajirka deleted the issue/13329-threat-item branch December 23, 2020 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants