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

client: Export Client Map #6040

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

kingthorin
Copy link
Member

@kingthorin kingthorin commented Dec 27, 2024

Overview

Add a context menu to facilitate exporting the Client Map as YAML.

Related Issues

N/A

Checklist

  • Update help
  • Update changelog
  • Run ./gradlew spotlessApply for code formatting
  • Write tests
  • Check code coverage
  • Sign-off commits
  • Squash commits
  • Use a descriptive title
example output
- node: "ClientMap"
  name: "Client Map"
  url: null
  isStorage: false
  visited: false
  children: 
  - node: "https://github.com/"
    name: "https://github.com"
    url: "https://github.com/"
    isStorage: false
    visited: false
    children: 
    - node: "https://github.com/OWASP/"
      name: "OWASP"
      url: "https://github.com/OWASP/"
      isStorage: false
      visited: false
      children: 
      - node: "https://github.com/OWASP/owasp-swag/"
        name: "owasp-swag"
        url: "https://github.com/OWASP/owasp-swag/"
        isStorage: false
        visited: false
        children: 
        - node: "https://github.com/OWASP/owasp-swag/tree/"
          name: "tree"
          url: "https://github.com/OWASP/owasp-swag/tree/"
          isStorage: false
          visited: false
          children: 
          - node: "https://github.com/OWASP/owasp-swag/tree/master/"
            name: "master"
            url: "https://github.com/OWASP/owasp-swag/tree/master/"
            isStorage: false
            visited: false
            children: 
            - node: "https://github.com/OWASP/owasp-swag/tree/master/projects/"
              name: "projects"
              url: "https://github.com/OWASP/owasp-swag/tree/master/projects/"
              isStorage: false
              visited: false
              children: 
              - node: "https://github.com/OWASP/owasp-swag/tree/master/projects/juice-shop"
                name: "juice-shop"
                url: "https://github.com/OWASP/owasp-swag/tree/master/projects/juice-shop"
                isStorage: false
                visited: false
  - node: "https://juice-shop.herokuapp.com/"
    name: "https://juice-shop.herokuapp.com"
    url: "https://juice-shop.herokuapp.com/"
    isStorage: false
    visited: false
    children: 
    - node: "https://juice-shop.herokuapp.com/#"
      name: "/#"
      url: "https://juice-shop.herokuapp.com/#"
      isStorage: false
      visited: false
      children: 
      - node: "https://juice-shop.herokuapp.com/#!"
        name: "!"
        url: "https://juice-shop.herokuapp.com/#!"
        isStorage: false
        visited: false
      - node: "https://juice-shop.herokuapp.com/#/"
        name: "/"
        url: "https://juice-shop.herokuapp.com/#/"
        isStorage: false
        visited: true
        components:
        - id: "language"
          text: "language=en; path=/; domain=juice-shop.herokuapp.com; expires=Sat, 27 Dec 2025 17:38:51\
  \ GMT"
          type: "Cookies"
          typeForDisplay: "Cookies"
          isStorageEvent: true
        - href: "https://owasp.org/"
          tagName: "A"
          text: "Open Worldwide Application Security Project (OWASP)"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "menu"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://owasp-juice.shop/"
          tagName: "A"
          text: "https://owasp-juice.shop"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/photo-wall"
          tagName: "A"
          text: "camera"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "OWASP Juice Shop"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/about"
          tagName: "A"
          text: "business_center"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/login"
          tagName: "A"
          text: "exit_to_app  Login"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/about"
          tagName: "A"
          text: "business_center  About Us"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "close  Close"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/photo-wall"
          tagName: "A"
          text: "camera  Photo Wall"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "school Help getting started"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/contact"
          tagName: "A"
          text: "feedback"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/login"
          tagName: "A"
          text: "exit_to_app"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "submitButton"
          tagName: "BUTTON"
          text: "send  Submit"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://www.eventbrite.com/e/owasp-global-appsec-san-francisco-2024-tickets-723699172707"
          tagName: "A"
          text: "Get a ticket*"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "language  placeholder"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - id: "cookieconsent_status"
          text: "cookieconsent_status=dismiss; path=/; domain=juice-shop.herokuapp.com; expires=Sat,\
  \ 27 Dec 2025 17:38:55 GMT"
          type: "Cookies"
          typeForDisplay: "Cookies"
          isStorageEvent: true
        - id: "navbarAccount"
          tagName: "BUTTON"
          text: "account_circle"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/contact"
          tagName: "A"
          text: "feedback  Customer Feedback"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://www.youtube.com/watch?v=9PnbKL3wuH4"
          tagName: "A"
          text: "But me wait!"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/score-board"
          tagName: "A"
          text: "Score Board"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "thumb_up0"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "language  EN"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/redirect?to=https://github.com/juice-shop/juice-shop"
          tagName: "A"
          text: "GitHub"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "Force page reload"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "visibility_off Dismiss"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - id: "welcomebanner_status"
          text: "welcomebanner_status=dismiss; path=/; domain=juice-shop.herokuapp.com; expires=Sat,\
  \ 27 Dec 2025 17:38:53 GMT"
          type: "Cookies"
          typeForDisplay: "Cookies"
          isStorageEvent: true
        - id: "navbarAccount"
          tagName: "BUTTON"
          text: "account_circle  Account"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://owasp.org/www-project-juice-shop/#div-userday2024"
          tagName: "A"
          text: "here"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "mat-input-0"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
      - node: "https://juice-shop.herokuapp.com/#/about"
        name: "/about"
        url: "https://juice-shop.herokuapp.com/#/about"
        isStorage: false
        visited: true
        components:
        - href: "https://www.youtube.com/watch?v=9PnbKL3wuH4"
          tagName: "A"
          text: "But me wait!"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/login"
          tagName: "A"
          text: "exit_to_app  Login"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/contact"
          tagName: "A"
          text: "feedback  Customer Feedback"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "OWASP Juice Shop"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/ftp/legal.md"
          tagName: "A"
          text: "LINK_TERMS_OF_USE"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://opensea.io/collection/juice-shop"
          tagName: "A"
          text: "NFT"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "navbarAccount"
          tagName: "BUTTON"
          text: "account_circle  Account"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#!"
          tagName: "A"
          text: "Incompetent customer support! Can't even upload photo of broken purchase!Support\
  \ Team: Sorry, only order confirmation PDFs can be attached to complaints! (anonymous)\
  \ ()"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "Reddit"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#!"
          tagName: "A"
          text: "Never gonna buy anywhere else from now on! Thanks for the great service! (anonymous)\
  \ ()"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://owasp.org/slack/invite"
          tagName: "A"
          text: "Slack"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/about"
          tagName: "A"
          text: "business_center  About Us"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "Twitter"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "language  EN"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://www.facebook.com/owasp.juiceshop"
          tagName: "A"
          text: "Facebook"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "Slack"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#!"
          tagName: "A"
          text: "This is the store for awesome stuff of all kinds! (anonymous) ()"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#!"
          tagName: "A"
          text: "cgvnb jhj5jyjghbikjm (anonymous) ()"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/photo-wall"
          tagName: "A"
          text: "camera  Photo Wall"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/ftp/legal.md"
          tagName: "A"
          text: "Check out our boring terms of use if you are interested in such lame stuff."
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#!"
          tagName: "A"
          text: "Keep up the good work! (anonymous) ()"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "Facebook"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#!"
          tagName: "A"
          text: "Nothing useful available here! (***[email protected]) ()"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#!"
          tagName: "A"
          text: "Great shop! Awesome service! (***@juice-sh.op) ()"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "mat-input-0"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#!"
          tagName: "A"
          text: "I love this shop! Best products in town! Highly recommended! (***[email protected])\
  \ ()"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#!"
          tagName: "A"
          text: "Please send me the juicy chatbot NFT in my wallet at /juicy-nft : \"purpose betray\
  \ marriage blame crunch monitor spin slide donate sport lift clutch\" (***[email protected])\
  \ ()"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://www.reddit.com/r/owasp_juiceshop"
          tagName: "A"
          text: "Reddit"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://twitter.com/owasp_juiceshop"
          tagName: "A"
          text: "Twitter"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://github.com/OWASP/owasp-swag/tree/master/projects/juice-shop"
          tagName: "A"
          text: "Press Kit"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/redirect?to=https://github.com/juice-shop/juice-shop"
          tagName: "A"
          text: "GitHub"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "Press Kit"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "NFT"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "menu"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/score-board"
          tagName: "A"
          text: "Score Board"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
      - node: "https://juice-shop.herokuapp.com/#/contact"
        name: "/contact"
        url: "https://juice-shop.herokuapp.com/#/contact"
        isStorage: false
        visited: true
        components:
        - tagName: "BUTTON"
          text: "OWASP Juice Shop"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/about"
          tagName: "A"
          text: "business_center  About Us"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/login"
          tagName: "A"
          text: "exit_to_app  Login"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "navbarAccount"
          tagName: "BUTTON"
          text: "account_circle  Account"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - id: "mat-input-0"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - id: "mat-input-3"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - id: "submitButton"
          tagName: "BUTTON"
          text: "send  Submit"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - id: "captchaControl"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "menu"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/contact"
          tagName: "A"
          text: "feedback  Customer Feedback"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/redirect?to=https://github.com/juice-shop/juice-shop"
          tagName: "A"
          text: "GitHub"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://www.youtube.com/watch?v=9PnbKL3wuH4"
          tagName: "A"
          text: "But me wait!"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/photo-wall"
          tagName: "A"
          text: "camera  Photo Wall"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/score-board"
          tagName: "A"
          text: "Score Board"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "language  EN"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - id: "userId"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
      - node: "https://juice-shop.herokuapp.com/#/forgot-password"
        name: "/forgot-password"
        url: "https://juice-shop.herokuapp.com/#/forgot-password"
        isStorage: false
        visited: false
      - node: "https://juice-shop.herokuapp.com/#/login"
        name: "/login"
        url: "https://juice-shop.herokuapp.com/#/login"
        isStorage: false
        visited: true
        components:
        - href: "https://juice-shop.herokuapp.com/#/forgot-password"
          tagName: "A"
          text: "Forgot your password?"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://www.youtube.com/watch?v=9PnbKL3wuH4"
          tagName: "A"
          text: "But me wait!"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "mat-input-0"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/score-board"
          tagName: "A"
          text: "Score Board"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "loginButton"
          tagName: "BUTTON"
          text: "exit_to_app  Log in"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "menu"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/contact"
          tagName: "A"
          text: "feedback  Customer Feedback"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "password"
          tagName: "INPUT"
          tagType: "password"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/photo-wall"
          tagName: "A"
          text: "camera  Photo Wall"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/register"
          tagName: "A"
          text: "Not yet a customer?"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "navbarAccount"
          tagName: "BUTTON"
          text: "account_circle  Account"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - id: "navbarLoginButton"
          tagName: "BUTTON"
          text: "exit_to_app  Login"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - id: "rememberMe-input"
          tagName: "INPUT"
          tagType: "checkbox"
          text: "on"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "OWASP Juice Shop"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - id: "loginButtonGoogle"
          tagName: "BUTTON"
          text: "Log in with Google"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "language  EN"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/about"
          tagName: "A"
          text: "business_center  About Us"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/redirect?to=https://github.com/juice-shop/juice-shop"
          tagName: "A"
          text: "GitHub"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/login"
          tagName: "A"
          text: "exit_to_app  Login"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "email"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
      - node: "https://juice-shop.herokuapp.com/#/photo-wall"
        name: "/photo-wall"
        url: "https://juice-shop.herokuapp.com/#/photo-wall"
        isStorage: false
        visited: true
        components:
        - id: "navbarAccount"
          tagName: "BUTTON"
          text: "account_circle  Account"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://twitter.com/intent/tweet?text=Welcome%20to%20the%20Bee%20Haven%20(/#/bee-haven)%F0%9F%90%9D%20(%C2%A9%20evmrox)%20@owasp_juiceshop&hashtags=appsec"
          tagName: "A"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "menu"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://twitter.com/intent/tweet?text=My%20rare%20collectors%20item!%20[%CC%B2%CC%85$%CC%B2%CC%85(%CC%B2%CC%85%20%CD%A1%C2%B0%20%CD%9C%CA%96%20%CD%A1%C2%B0%CC%B2%CC%85)%CC%B2%CC%85$%CC%B2%CC%85]%20(%C2%A9%20bkimminich)%20@owasp_juiceshop&hashtags=appsec"
          tagName: "A"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "navbarLoginButton"
          tagName: "BUTTON"
          text: "exit_to_app  Login"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/contact"
          tagName: "A"
          text: "feedback  Customer Feedback"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/photo-wall"
          tagName: "A"
          text: "camera  Photo Wall"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://twitter.com/intent/tweet?text=I%20love%20going%20hiking%20here...%20(%C2%A9%20j0hNny)%20@owasp_juiceshop&hashtags=appsec"
          tagName: "A"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "mat-input-0"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - href: "https://twitter.com/intent/tweet?text=Magn(et)ificent!%20(%C2%A9%20bkimminich)%20@owasp_juiceshop&hashtags=appsec"
          tagName: "A"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://twitter.com/intent/tweet?text=Building%20something%20literally%20bottom%20up...%20@owasp_juiceshop&hashtags=appsec"
          tagName: "A"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://twitter.com/intent/tweet?text=Everything%20up%20and%20running!%20@owasp_juiceshop&hashtags=appsec"
          tagName: "A"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://twitter.com/intent/tweet?text=Sorted%20the%20pieces,%20starting%20assembly%20process...%20@owasp_juiceshop&hashtags=appsec"
          tagName: "A"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://twitter.com/intent/tweet?text=My%20old%20workplace...%20(%C2%A9%20E=ma%C2%B2)%20@owasp_juiceshop&hashtags=appsec"
          tagName: "A"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://twitter.com/intent/tweet?text=%F0%9F%98%BC%20#zatschi%20#whoneedsfourlegs%20@owasp_juiceshop&hashtags=appsec"
          tagName: "A"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/score-board"
          tagName: "A"
          text: "Score Board"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "OWASP Juice Shop"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/redirect?to=https://github.com/juice-shop/juice-shop"
          tagName: "A"
          text: "GitHub"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "language  EN"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/about"
          tagName: "A"
          text: "business_center  About Us"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://twitter.com/intent/tweet?text=Putting%20in%20the%20hardware...%20@owasp_juiceshop&hashtags=appsec"
          tagName: "A"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/login"
          tagName: "A"
          text: "exit_to_app  Login"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://www.youtube.com/watch?v=9PnbKL3wuH4"
          tagName: "A"
          text: "But me wait!"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
      - node: "https://juice-shop.herokuapp.com/#/register"
        name: "/register"
        url: "https://juice-shop.herokuapp.com/#/register"
        isStorage: false
        visited: true
        components:
        - href: "https://juice-shop.herokuapp.com/#/login"
          tagName: "A"
          text: "Already a customer?"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/redirect?to=https://github.com/juice-shop/juice-shop"
          tagName: "A"
          text: "GitHub"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "language  EN"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/score-board"
          tagName: "A"
          text: "Score Board"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/contact"
          tagName: "A"
          text: "feedback  Customer Feedback"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "registerButton"
          tagName: "BUTTON"
          text: "person_add  Register"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/photo-wall"
          tagName: "A"
          text: "camera  Photo Wall"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "repeatPasswordControl"
          tagName: "INPUT"
          tagType: "password"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - id: "securityAnswerControl"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "menu"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/login"
          tagName: "A"
          text: "exit_to_app  Login"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "mat-slide-toggle-1-input"
          tagName: "INPUT"
          tagType: "checkbox"
          text: "on"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - href: "https://www.youtube.com/watch?v=9PnbKL3wuH4"
          tagName: "A"
          text: "But me wait!"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "passwordControl"
          tagName: "INPUT"
          tagType: "password"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - id: "emailControl"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - id: "mat-input-0"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/about"
          tagName: "A"
          text: "business_center  About Us"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "navbarAccount"
          tagName: "BUTTON"
          text: "account_circle  Account"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "OWASP Juice Shop"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
      - node: "https://juice-shop.herokuapp.com/#/score-board"
        name: "/score-board"
        url: "https://juice-shop.herokuapp.com/#/score-board"
        isStorage: false
        visited: false
      - node: "https://juice-shop.herokuapp.com/#/search"
        name: "/search"
        url: "https://juice-shop.herokuapp.com/#/search"
        isStorage: false
        visited: true
        components:
        - href: "https://juice-shop.herokuapp.com/#/about"
          tagName: "A"
          text: "business_center  About Us"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "OWASP Juice Shop"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://www.youtube.com/watch?v=9PnbKL3wuH4"
          tagName: "A"
          text: "But me wait!"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/login"
          tagName: "A"
          text: "exit_to_app  Login"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/redirect?to=https://github.com/juice-shop/juice-shop"
          tagName: "A"
          text: "GitHub"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "menu"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - tagName: "BUTTON"
          text: "language  EN"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/contact"
          tagName: "A"
          text: "feedback  Customer Feedback"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/score-board"
          tagName: "A"
          text: "Score Board"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - href: "https://juice-shop.herokuapp.com/#/photo-wall"
          tagName: "A"
          text: "camera  Photo Wall"
          type: "nodeAdded"
          typeForDisplay: "Link"
          isStorageEvent: false
        - id: "navbarAccount"
          tagName: "BUTTON"
          text: "account_circle  Account"
          type: "nodeAdded"
          typeForDisplay: "Button"
          isStorageEvent: false
        - id: "mat-input-0"
          tagName: "INPUT"
          tagType: "text"
          type: "nodeAdded"
          typeForDisplay: "Input"
          isStorageEvent: false
    - node: "https://juice-shop.herokuapp.com/ftp/"
      name: "ftp"
      url: "https://juice-shop.herokuapp.com/ftp/"
      isStorage: false
      visited: false
      children: 
      - node: "https://juice-shop.herokuapp.com/ftp/legal.md"
        name: "legal.md"
        url: "https://juice-shop.herokuapp.com/ftp/legal.md"
        isStorage: false
        visited: false
    - node: "https://juice-shop.herokuapp.com/redirect?to=https://github.com/juice-shop/juice-shop"
      name: "redirect(to)"
      url: "https://juice-shop.herokuapp.com/redirect?to=https://github.com/juice-shop/juice-shop"
      isStorage: false
      visited: false
    - node: "https://juice-shop.herokuapp.com/Cookies"
      name: "Cookies"
      url: "https://juice-shop.herokuapp.com/Cookies"
      isStorage: true
      visited: true
      components:
      - id: "welcomebanner_status"
        text: "welcomebanner_status=dismiss; path=/; domain=juice-shop.herokuapp.com; expires=Sat,\
  \ 27 Dec 2025 17:38:53 GMT"
        type: "Cookies"
        typeForDisplay: "Cookies"
        isStorageEvent: true
      - id: "cookieconsent_status"
        text: "cookieconsent_status=dismiss; path=/; domain=juice-shop.herokuapp.com; expires=Sat,\
  \ 27 Dec 2025 17:38:55 GMT"
        type: "Cookies"
        typeForDisplay: "Cookies"
        isStorageEvent: true
      - id: "language"
        text: "language=en; path=/; domain=juice-shop.herokuapp.com; expires=Sat, 27 Dec 2025 17:38:51\
  \ GMT"
        type: "Cookies"
        typeForDisplay: "Cookies"
        isStorageEvent: true
  - node: "https://opensea.io/"
    name: "https://opensea.io"
    url: "https://opensea.io/"
    isStorage: false
    visited: false
    children: 
    - node: "https://opensea.io/collection/"
      name: "collection"
      url: "https://opensea.io/collection/"
      isStorage: false
      visited: false
      children: 
      - node: "https://opensea.io/collection/juice-shop"
        name: "juice-shop"
        url: "https://opensea.io/collection/juice-shop"
        isStorage: false
        visited: false
  - node: "https://owasp-juice.shop/"
    name: "https://owasp-juice.shop"
    url: "https://owasp-juice.shop/"
    isStorage: false
    visited: false
    children: 
    - node: "https://owasp-juice.shop/"
      name: "/"
      url: "https://owasp-juice.shop/"
      isStorage: false
      visited: false
  - node: "https://owasp.org/"
    name: "https://owasp.org"
    url: "https://owasp.org/"
    isStorage: false
    visited: false
    children: 
    - node: "https://owasp.org/"
      name: "/"
      url: "https://owasp.org/"
      isStorage: false
      visited: false
    - node: "https://owasp.org/slack/"
      name: "slack"
      url: "https://owasp.org/slack/"
      isStorage: false
      visited: false
      children: 
      - node: "https://owasp.org/slack/invite"
        name: "invite"
        url: "https://owasp.org/slack/invite"
        isStorage: false
        visited: false
    - node: "https://owasp.org/www-project-juice-shop/"
      name: "www-project-juice-shop"
      url: "https://owasp.org/www-project-juice-shop/"
      isStorage: false
      visited: false
      children: 
      - node: "https://owasp.org/www-project-juice-shop/#"
        name: "/#"
        url: "https://owasp.org/www-project-juice-shop/#"
        isStorage: false
        visited: false
        children: 
        - node: "https://owasp.org/www-project-juice-shop/#div-userday2024"
          name: "div-userday2024"
          url: "https://owasp.org/www-project-juice-shop/#div-userday2024"
          isStorage: false
          visited: false
  - node: "https://twitter.com/"
    name: "https://twitter.com"
    url: "https://twitter.com/"
    isStorage: false
    visited: false
    children: 
    - node: "https://twitter.com/intent/"
      name: "intent"
      url: "https://twitter.com/intent/"
      isStorage: false
      visited: false
      children: 
      - node: "https://twitter.com/intent/tweet?text=Magn(et)ificent!%20(%C2%A9%20bkimminich)%20@owasp_juiceshop&hashtags=appsec"
        name: "tweet(hashtags,text)"
        url: "https://twitter.com/intent/tweet?text=Magn(et)ificent!%20(%C2%A9%20bkimminich)%20@owasp_juiceshop&hashtags=appsec"
        isStorage: false
        visited: false
      - node: "https://twitter.com/intent/tweet?text=%F0%9F%98%BC%20"
        name: "tweet(text)"
        url: "https://twitter.com/intent/tweet?text=%F0%9F%98%BC%20"
        isStorage: false
        visited: false
        children: 
        - node: "https://twitter.com/intent/tweet?text=%F0%9F%98%BC%20#"
          name: "#"
          url: "https://twitter.com/intent/tweet?text=%F0%9F%98%BC%20#"
          isStorage: false
          visited: false
          children: 
          - node: "https://twitter.com/intent/tweet?text=Welcome%20to%20the%20Bee%20Haven%20(/#/bee-haven)%F0%9F%90%9D%20(%C2%A9%20evmrox)%20@owasp_juiceshop&hashtags=appsec"
            name: "/bee-haven)%F0%9F%90%9D%20(%C2%A9%20evmrox)%20@owasp_juiceshop&hashtags=appsec"
            url: "https://twitter.com/intent/tweet?text=Welcome%20to%20the%20Bee%20Haven%20(/#/bee-haven)%F0%9F%90%9D%20(%C2%A9%20evmrox)%20@owasp_juiceshop&hashtags=appsec"
            isStorage: false
            visited: false
          - node: "https://twitter.com/intent/tweet?text=%F0%9F%98%BC%20#zatschi%20#whoneedsfourlegs%20@owasp_juiceshop&hashtags=appsec"
            name: "zatschi%20#whoneedsfourlegs%20@owasp_juiceshop&hashtags=appsec"
            url: "https://twitter.com/intent/tweet?text=%F0%9F%98%BC%20#zatschi%20#whoneedsfourlegs%20@owasp_juiceshop&hashtags=appsec"
            isStorage: false
            visited: false
    - node: "https://twitter.com/owasp_juiceshop"
      name: "owasp_juiceshop"
      url: "https://twitter.com/owasp_juiceshop"
      isStorage: false
      visited: false
  - node: "https://www.eventbrite.com/"
    name: "https://www.eventbrite.com"
    url: "https://www.eventbrite.com/"
    isStorage: false
    visited: false
    children: 
    - node: "https://www.eventbrite.com/e/"
      name: "e"
      url: "https://www.eventbrite.com/e/"
      isStorage: false
      visited: false
      children: 
      - node: "https://www.eventbrite.com/e/owasp-global-appsec-san-francisco-2024-tickets-723699172707"
        name: "owasp-global-appsec-san-francisco-2024-tickets-723699172707"
        url: "https://www.eventbrite.com/e/owasp-global-appsec-san-francisco-2024-tickets-723699172707"
        isStorage: false
        visited: false
  - node: "https://www.facebook.com/"
    name: "https://www.facebook.com"
    url: "https://www.facebook.com/"
    isStorage: false
    visited: false
    children: 
    - node: "https://www.facebook.com/owasp.juiceshop"
      name: "owasp.juiceshop"
      url: "https://www.facebook.com/owasp.juiceshop"
      isStorage: false
      visited: false
  - node: "https://www.reddit.com/"
    name: "https://www.reddit.com"
    url: "https://www.reddit.com/"
    isStorage: false
    visited: false
    children: 
    - node: "https://www.reddit.com/r/"
      name: "r"
      url: "https://www.reddit.com/r/"
      isStorage: false
      visited: false
      children: 
      - node: "https://www.reddit.com/r/owasp_juiceshop"
        name: "owasp_juiceshop"
        url: "https://www.reddit.com/r/owasp_juiceshop"
        isStorage: false
        visited: false
  - node: "https://www.youtube.com/"
    name: "https://www.youtube.com"
    url: "https://www.youtube.com/"
    isStorage: false
    visited: false
    children: 
    - node: "https://www.youtube.com/watch?v=9PnbKL3wuH4"
      name: "watch(v)"
      url: "https://www.youtube.com/watch?v=9PnbKL3wuH4"
      isStorage: false
      visited: false

FYI I did validate via: https://jsonformatter.org/yaml-validator

@kingthorin kingthorin marked this pull request as draft December 27, 2024 17:45
@kingthorin
Copy link
Member Author

Switched to draft, there's some obvious things I need to clean up.

@psiinon

This comment has been minimized.

@kingthorin kingthorin marked this pull request as ready for review December 28, 2024 11:12
Copy link
Member

@psiinon psiinon left a comment

Choose a reason for hiding this comment

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

Definitely need a good set of unit tests.

@kingthorin
Copy link
Member Author

FYI I did validate via: https://jsonformatter.org/yaml-validator

@kingthorin kingthorin force-pushed the client-exp branch 2 times, most recently from 995975b to 3094c2b Compare December 31, 2024 13:00
@kingthorin
Copy link
Member Author

Now excludes text on storage events.

@kingthorin kingthorin force-pushed the client-exp branch 4 times, most recently from d404916 to e1e741e Compare January 6, 2025 13:42
Comment on lines 169 to 183
public static void exportClientMap(File file) throws IOException {
try (FileWriter fw = new FileWriter(file, false)) {
exportClientMap(fw);
}
}

public static void exportClientMap(Writer fw) throws IOException {
exportClientMap(fw, extension.getClientTree());
}

public static void exportClientMap(Writer fw, ClientMap clientMap) throws IOException {
try (BufferedWriter bw = new BufferedWriter(fw)) {
outputNode(bw, clientMap.getRoot(), 0);
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Should I reduce visibility on these?

@kingthorin kingthorin force-pushed the client-exp branch 13 times, most recently from 5588fb8 to 1b4cc93 Compare January 7, 2025 13:31
@kingthorin kingthorin force-pushed the client-exp branch 10 times, most recently from 4979437 to 9d33816 Compare January 8, 2025 17:58
@kingthorin
Copy link
Member Author

Now includes simple help content.

import org.zaproxy.zap.testutils.TestUtils;

/* Unit Tests for {@code ClientSideComponenetUnitTest}
* SoretedSets are used for compareTo testing
Copy link
Member

Choose a reason for hiding this comment

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

It would have been better to test each field.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can also add tests which do that, it was on my todo I just hadn't managed to get to that yet.

&& "nodeAdded".equalsIgnoreCase(component.getType())))) {
continue;
}
first = outputKV(fw, indent, first, "nodeType", component.getTypeForDisplay());
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't be using i18n'ed strings in the export.

Copy link
Member Author

@kingthorin kingthorin Jan 9, 2025

Choose a reason for hiding this comment

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

I understand your point and I'm happy to change it somehow, this is what was asked for.

Shall I switch display types to an enum so the export can use standard labels/names while the UI uses i18n values?

Copy link
Member

Choose a reason for hiding this comment

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

That would be better but it depends how much time that adds.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm open to suggestions.

Copy link
Member

Choose a reason for hiding this comment

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

If there are no time constraints anymore +1 to enum.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm curious why you feel an enum will be slow?

Copy link
Member Author

Choose a reason for hiding this comment

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

Or do you mean implementation time?

@kingthorin kingthorin force-pushed the client-exp branch 9 times, most recently from 66e785c to 4f0c7c3 Compare January 9, 2025 22:22
Signed-off-by: kingthorin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants