Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@spreadmonitor/network
Advanced tools
This modules is an universal network layer.
npm install @spreadmonitor/network
NOTE: This package has a peer-dependency of some
@angular/*
packages..
After successful install, import the NetworkModule
into your root NgModule
.
import { NetworkModule, NetworkAuthService } from '@spreadmonitor/network';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
HttpClientModule,
NetworkModule.forRoot({
/**
* Base endpoint for the API.
* Notice there is no slash in the end.
*/
baseUrl: 'https://api.your-beautiful-api.com',
/**
* Type of the auth method.
*
* Valid values are 'basic' or 'bearer'.
*/
authType: 'bearer',
})
],
providers: [
/**
* AuthService is your own implementation, which must have a
* - token: string property
* - authenticated: boolean property
*/
{ provide: NetworkAuthService, useExisting: AuthService, }
]
bootstrap: [AppComponent],
})
export class AppModule {}
@Component()
class CustomComponent {
constructor(
private network: NetworkService;
);
public getSomething(path: string) {
this.network.get(path, { queryParamOne = 4, boolean: true, stringValue: 'yay' }).subscribe(response => {
console.log('Response arrived', response);
});
}
public postSomething(path: string) {
this.network.get(path, { myData: 5 } { queryParamOne = 4, boolean: true, stringValue: 'yay' }).subscribe(response => {
console.log('Payload sent, response arrived', response);
});
}
}
Before contributing to this package please make sure you have read our CONTRIBUTING guide.
FAQs
Universal network layer for our Angular applications.
The npm package @spreadmonitor/network receives a total of 16 weekly downloads. As such, @spreadmonitor/network popularity was classified as not popular.
We found that @spreadmonitor/network demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.