-
Notifications
You must be signed in to change notification settings - Fork 1
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
Hackathon24 #100
Hackathon24 #100
Conversation
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
@SocketSecurity ignore-all |
😞 CodeQL again |
Report too large to display inline |
I was lurking here today and this made me laugh really hard after seeing how long that list was 😆 |
...i am so sorry, basically after i did this i was like... how do i undo now plz, and couldn't figure it out :O |
Summary of changes
The app should continue to work without clearing localStorage, but a few things might not function quite as intended.
via react-router-dombuilt-in; the newbasename
prop passed to theBadMagic
component defines the Bad Magic URL rootBadMagicProps
Testing
via
example
projectTo test with the included example project, follow the instructions in
README.md
, i.e.:yarn && yarn link
in the root directoryyarn && yarn link badmagic
in the./example
directorycraco
, if you have issues inside theexample
directory, runasdf install && npm i -g yarn
yarn
in the./example-api
directory./example
directory, and./example-api
directory, runyarn start
in CMW
You should also be able to test inside of CMW.
yarn
via homebrew, or it'll cause issues:which yarn
brew uninstall yarn
asdf
should be set up to read the.tool-versions
file in your working directory, cd intobadmagic
, runasdf install
if necessary, and install yarn vianpm i -g yarn
badmagic
. Runyarn -v
and verify that you are running on 1.x (i.e. 1.22.22)yarn && yarn build && yarn pack
yarn pack
command should return a path to the generated tarball file; copy it to your clipboardcontrol.smartrent.com
. Runyarn -v
and verify that the yarn binary is being used from the project (i.e.3.2.0-rc.13
)yarn add badmagic@file:<paste clipboard>
, e.g.yarn add badmagic@/Users/yourname/code/badmagic/badmagic-v0.0.39.tgz
assets/js/react/bundles/devtools/BadMagicClient.tsx
. Add the propbasename="/dev/api"
to the<BadMagic />
component returned byBadMagicClient
Markdown CSS
I made some slight adjustments to the Markdown CSS file as well, though due to the fact that the syntax highlighter tries to automatically infer the language even without a language tag, I don't think you'll actually see the CSS changes because they were only affecting some unhighlighted code elements. Regardless, if you want to also test it with the latest CSS file:
yarn build
inside of thebadmagic
repository root so thatmarkdown.min.css
is generated and put inside of./example/public/
cd ./example && yarn start
and verify the example UI loads at http://localhost:3000/dev/apiapps/control_room/lib/control_room_web/templates/development/react/badmagic.html.eex
. Replace theunpkg
URL for BadMagic's stylesheet withhttp://localhost:3000/dev/api/markdown.min.css
apps/control_room/lib/control_room_web/plugs/secure_browser_headers.ex
. Find the"style-src"
list and append the"http://localhost:3000"
string to the list of allowed domains.Most of the features are also testable in the demo app. An API server is included as well.