![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@gnosis.pm/dx-monitor
Advanced tools
Gnosis monitor is a general porpouse notification system.
web3
,
mailRepo
to send mails, keyValueRepo
to handle simple persistance.# Install dependencies
yarn install
# Run any monitor group
yarn start <montitor-group-name>
A monitor group is a list of checks that are done at the same intervals.
They have a arbitrary name, usually it references either when it's being executed or the functional name of the check list it contains.
They will match a chron job, for example:
00 07 * * 1 npm run --silent --prefix /usr/src/app daily-midnight
NOTE: Instead of using a chron service within the docker image, we would use Kubernetes chron jobs.
Were daily-midnight
is just a group defined in the configuration:
const monitorGroups = {
'daily-midnight': [{
name: 'DutchX upgrade',
description: 'Monitor DutchX master contract changes',
handler: '@gnosis.pm/monitor-dutchx-upgrade/src/MonitorDutchXUpgrade',
config: {
// Any config can be set here, it will be handed to the constructor, but
// usually no config is needed and most parametrization should be done
// by env variable (use a prefix in the env vars to prevent name
// collitions)
}
},{
name: 'OWL upgrade',
description: 'OWL master contract change',
handler: '@gnosis.pm/monitor-owl-upgrade/src/MonitorOwlUpgrade'
}],
// ...
}
The handlers are the ones holding the logic for the check.
The handler have only one method:
check() : Promise<Void>
The monitor will initialize the handler using the config, and also it's going to inject repositories to make check implementation easier. i.e:
new MonitorDutchXUpgrade({
keyValueRepo,
mailRepo,
web3
// maybe in the future we add more repos, like slack repo, etc...
}, config)
Were keyValueRepo
will be a repository that will allow the checks to persist
and access data, so they can keep state.
Allows to persist and fetch data.
The interface is very simple:
get(key: String) : Promise<JsonValue>
:
set(key: key, value: JsonValue) : Promise<void>
delete(key: JsonValue) : Promise<void>
Where JsonValue
is any valid JSON: https://www.json.org
For example, the checks can do logics like:
// Save last execution
const now = new Date()
await keyValueRepo.set('dutchx:update:lastExecution', now.toISOString())
// Get last master addresses used and if we already notified
const masterAddress = await keyValueRepo.get('dutchx:update:masterAddress')
const alreadyNotified = await keyValueRepo.get('dutchx:update:alreadyNotified')
Allows to send mails.
The interface is:
sendMail(params) : Proise<void>
Were params
is an object with:
from
: The from will be ignored, so is not actually a param. It'll be set to
the one defined in the configuration of the monitor.to
: i.e. 'baz@example.com'
, can be a list alsosubject
: i.e. 'Hi there ✔'
text
: i.e. 'How are you doing?'
html
: i.e. 'How are <b>you</b> doing?'
All checks will receive a web3
instance:
FAQs
Gnosis monitor is a general porpouse notification system.
The npm package @gnosis.pm/dx-monitor receives a total of 0 weekly downloads. As such, @gnosis.pm/dx-monitor popularity was classified as not popular.
We found that @gnosis.pm/dx-monitor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.