Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
github.com/redskyops/redskyops-ui/v2
The User Interface project (redskyops-ui) is a web application for visualizing experiment results from a remote Red Sky API server. Generally the web application is not deployed, but instead accessed locally on your workstation via redskyctl
.
To build the application you must have a recent version of npm. To install the required Node.js modules run:
npm install
To generate the Go code (only required for releases) you must have a recent version of Go (1.12+) and the latest version of vfsgendev
:
go get -u github.com/shurcooL/vfsgen/cmd/vfsgendev
This project is based on "Create React App", to generate an optimized production build in the /build
directory run:
REACT_APP_BASE_FOLDER=/ui REDSKY_UI_SUBFOLDER=/ui npm run build
To set the base URL for backend you have to set REACT_APP_BACKEND_URL environment variable, the default is /api if this variable is not set
REACT_APP_BASE_FOLDER=/ui REACT_APP_BACKEND_URL=/v1 npm run build
The above will make UI call the backend on /v1 and serve the app from /ui folder
This project uses vfsgen to generate Go code representing the contents of the /build
directory. The /ui/assets_vfsdata.go
file can be re-generated using:
go generate ./ui
.env
fileYou need below environment variables to connect to Redsky backend server
REDSKY_SERVER_IDENTIFIER={url-to-backend-server}
REDSKY_SERVER_ISSUER={url-to-oauth-server}
REDSKY_AUTHORIZATION_CLIENT_ID={API-Key}
REDSKY_AUTHORIZATION_CLIENT_SECRET={API-Secret}
You can make a copy of .env.example
and rename it to .env
and define these variables there.
In addition to the development server, you must run a local proxy to access the Red Sky Server:
npm run proxy
npm start
The application will then be available at: http://localhost:3000
If the app need to be hosted in subfolder like http://some-domain.com/sub-folder
you need to set this environment variable when running npm run build
to make the React app aware of that:
REACT_APP_BASE_FOLDER='/sub-folder'
Please take note of the forward slash at the beginning
As frontend assets will be served from sub folder in production server you can simulate the production setup by following steps:
You need a to define an environment variable REDSKY_UI_SUBFOLDER
to set the folder name that will server the frontend from
Please take note of the forward slash at the beginning, this is important to keep when defining folder name
REDSKY_UI_SUBFOLDER='/sub-folder'
You can define this in the .env
file, also important to keep the other Red Sky API keys environment variables in .env
Run the following commands to source the environments vars
set -a
source ./.env
Boot up Docker containers
docker-compose build
docker-compose up
For the first time these commands will take time to finish NGINX will bind to port 8080
You can access the frontend app on http://localhost:8080/sub-folder
If you want to change the folder you need to run the steps 2 and 3 again after you update the environment variable in .env
assets_vfsdata.go
file and commit to GitFAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.