Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@lifeomic/alpha-cli
Advanced tools
alpha-cli
provides a curl-like CLI wrapper around the alpha
client. This
allows Lambda services to be directly invoked manually.
$ npm install -g @lifeomic/alpha-cli
$ alpha --help
Options:
--help Show help [boolean]
-H, --header Pass custom header line to server [string]
--lambda-handler A javascript/typescript lambda handler to send requests
to [string]
--env-file File to load as environment variables when importing
lambda [string]
-X, --request Specify the request method to use
--data-binary Send binary data
--proxy-port port to proxy requests on [number] [default: 9000]
--proxy http proxy requests to alpha [boolean] [default: false]
--sign Sign requests with AWS SignatureV4
[boolean] [default: false]
--role Role to assume when signing [string]
--validate-status Validate the HTTP response code and fail if not 2XX
[boolean] [default: false]
-V, --version Show the version number and quit [boolean]
$ alpha lambda://user-service/users/jagoda | jq
{
"id": "jagoda",
"profile": {
"email": "jeff.jagoda@lifeomic.com"
}
}
Use for services like OpenSearch when set up with Role based auth.
When combined with the --proxy
option normal RESTful UI tools can then
be used to hit a cluster without additional configuration.
This is a guide on how to proxy GraphQL requests through Alpha
in order to be able
to use IDEs to construct and execute queries. While this approach is IDE
agnostic, this will demonstrate how to proxy to the Insomnia IDE,
offering capabilities like automatic schema detection, auto-complete, linting,
and a convenient way to save queries.
Insomnia has a nice interface, but [Postman] and other IDEs should work as well.
If you have brew, all you need to do to install Insomnia is run:
brew install --cask insomnia
You'll need to be authenticated against your AWS environment
# Connect to the proxy
alpha --proxy lambda://my-graphql-lambda:deployed
Once you're logged in and your proxy is running, launch Insomnia and start creating/organizing queries. It may be convenient to organize them by folder.
For a typical GraphQL request, you'll want to configure your request to POST
to http://localhost:[port],
You'll also likely need to configure headers. If using lifeomic APIs, you may need lifeomic-account
and lifeomic-user
depending
on the service:
Depending on how you've configured Insomnia, it will either automatically start fetching the schema, or you can manually fetch it.
Once you've successfully loaded the schema, you can pull up documentation using the same dialog, allowing you to click through and copy GraphQL queries/mutations.
Now that the schema is loaded, you can review documentation and create and test queries with autocomplete
FAQs
Curl-like CLI for the Alpha client
We found that @lifeomic/alpha-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.