
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
These are Typescript definitions for the OGraf API.
import { GraphicsAPI } from 'ograf';
// Setup my OGraf graphic WebComponent:
class MyOGrafGraphic extends HTMLElement implements GraphicsAPI.Graphic {
connectedCallback() {
// Called when the element is added to the DOM
// Note: Don't paint any pixels at this point, wait for load() to be called
}
async load(params) {
if (params.renderType !== "realtime")
throw new Error("Only realtime rendering is supported by this graphic");
const elText = document.createElement("p");
elText.innerHTML = "Hello world!";
this.appendChild(elText);
// When everything is loaded we can return:
return {
statusCode: 200,
};
}
async dispose(_params) {
this.innerHTML = "";
}
async getStatus(_params) {
return {
statusCode: 200,
status: {
// nothing
},
};
}
async updateAction(_params) {
// No actions are implemented in this minimal example
}
async playAction(_params) {
// No actions are implemented in this minimal example
}
async stopAction(_params) {
// No actions are implemented in this minimal example
}
async customAction(params) {
// No actions are implemented in this minimal example
}
async goToTime(_payload) {
throw new Error("Non-realtime not supported!");
}
async setActionsSchedule(_payload) {
throw new Error("Non-realtime not supported!");
}
}
The instructions below are for developers who want to work on the Typescript definitions.
npm install
npm run build
# or
npm run watch
FAQs
TypeScript definitions for Ograf graphics
We found that ograf demonstrated a healthy version release cadence and project activity because the last version was released less than 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 how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.