
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@sketchmine/dom-agent
Advanced tools
Dom Agent that gets injected to get all the style information about a page
The DOM agent is at the heart of the entire library. This package takes responsibility for scraping the style information from a Webpage and outputing an abstract format with the DOM representation and the styling. Based on this information, sketch-builder can be used to later draw the Sketch file.
The DOM agent consists of three parts:
For building the package Rollup.js is used as a module bundler. The configuration can be found in the rollup.config.js
and is orchestrated by the yarn package manager.
The package bundle is in the ecmascript module format and is meant to be consumed only by the browser.
The build can be started with the following two commands:
yarn build
for building the package.yarn dev
for building and watching the sources of the package. (rebuilds after safe)The source code of this package is going to be linted by our CI environment. To ensure a coding standard and quality, use the configured linter tslint. This package extends from the tslint-config-airbnb
and the linting configuration extends from the root tslint.json
.
Run yarn lint
to execute the linter.
To ensure that the DOM agent is properly working, it's necessary that you write tests. There are two types of tests:
End to end tests have to end with filename.e2e.ts
and unit tests with filename.test.ts
.
For the end to end tests, Puppeteer is used as a headless Chrome browser.
Note: All tests based on this package should be wrapped in a describe
method with the prefix: [dom-agent] › ...
like the following:
// import statements
describe('[dom-agent]› ${folder} › ${description of the suite}', () => {
// your tests should be placed here
});
The Jest framework has been selected for tests.
Run yarn test
to run all tests specified for this package. Run yarn test -f filename.test
to run only tests that matches the provided RegExp for the filename.
FAQs
Dom Agent that gets injected to get all the style information about a page
We found that @sketchmine/dom-agent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.