Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@nguniversal/socket-engine
Advanced tools
Framework and Platform agnostic Angular Universal rendering.
npm install @nguniversal/socket-engine @nguniversal/common --save
const socketEngine = require('@nguniversal/socket-engine');
// * NOTE :: leave this as require() since this file is built Dynamically from webpack
const {AppServerModuleNgFactory, LAZY_MODULE_MAP} = require('./dist/server/main');
socketEngine.startSocketEngine(AppServerModuleNgFactory);
This will the socket engine which internally hosts a TCP Socket server.
The default port is 9090
and host of localhost
You may want to leave this as a plain .js
file since it is so simple and to make deploying it easier, but it can be easily transpiled from Typescript.
Your client can be whatever language, framework or platform you like.
As long as it can connect to a TCP Socket (which all frameworks can) then you're good to go.
This example will use JS for simplicity
import * as net from 'net';
const client = net.createConnection(9090, 'localhost', () => {
console.log('connected to SSR server');
});
client.on('data', data => {
const res = JSON.parse(data.toString()) as SocketEngineResponse;
expect(res.id).toEqual(1);
expect(res.html).toEqual(template);
server.close();
done();
});
const renderOptions = {id: 1, url: '/path', document: '<app-root></app-root>'} as SocketEngineRenderOptions;
client.write(JSON.stringify(renderOptions));
16.0.0 (2023-05-03)
Node.js v14 support has been removed
Node.js v14 is planned to be End-of-Life on 2023-04-30. Angular will stop supporting Node.js v14 in Angular v16. Angular v16 will continue to officially support Node.js versions v16 and v18.
| Commit | Type | Description |
| ------------------------------------------------------------------------------------------------ | ---- | ---------------------------------------------------------- |
| 3af1451a | feat | add standalone support to ng add
|
| 1e2b9385 | feat | support rendering standalone application |
| 500f5e54 | fix | export default bootstrap in server template for standalone |
| 66021f10 | fix | update import for template server file |
| Commit | Type | Description | | ------------------------------------------------------------------------------------------------ | ---- | ----------------------------------------------------- | | 0481bde7 | feat | add support for prerendering a standalone application |
| Commit | Type | Description | | ------------------------------------------------------------------------------------------------ | -------- | ------------------------------------------------------ | | 9fbdb23c | feat | add CSP support for inline styles | | 010546e5 | feat | support rendering standalone application | | 71c2cef8 | fix | update TransferHttpResponse requiring body and headers | | ae96fbc4 | refactor | remove Node.js v14 support |
<!-- CHANGELOG SPLIT MARKER --><a name="15.2.1"></a>
FAQs
Socket Engine for running Server Angular Apps
The npm package @nguniversal/socket-engine receives a total of 8 weekly downloads. As such, @nguniversal/socket-engine popularity was classified as not popular.
We found that @nguniversal/socket-engine 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.