Skip to content

Commit 0664e3e

Browse files
add ansi-html
1 parent 56e9f7f commit 0664e3e

File tree

3 files changed

+186
-0
lines changed

3 files changed

+186
-0
lines changed

docs/.vuepress/components/ELSTechnology.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ const techData = [
260260
versions: "1.5.x | 1.6.x | 1.7.x | 1.8.x",
261261
link: "./angularjs/",
262262
},
263+
{
264+
name: "ansi-html",
265+
versions: "0.0.7",
266+
link: "./ansi-html/",
267+
},
263268
{
264269
name: "base64url",
265270
versions: "0.0.6",

docs/.vuepress/config-client/sidebar.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ export default {
204204
path: '/els-for-runtimes-and-libraries/angularjs/',
205205
icon: '/images/angularjs-logo.webp',
206206
},
207+
{
208+
path: '/els-for-runtimes-and-libraries/ansi-html/',
209+
icon: '/images/javascript.webp',
210+
},
207211
{
208212
path: '/els-for-runtimes-and-libraries/bootstrap/',
209213
icon: '/images/bootstrap-logo.webp',
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# ansi-html
2+
3+
Endless Lifecycle Support (ELS) for ansi-html from TuxCare provides security fixes for ansi-html versions that have reached their end of life. This allows you to continue running ansi-html applications without vulnerability concerns, even after official support has ended.
4+
5+
## Supported ansi-html Versions
6+
7+
* ansi-html 0.0.7
8+
9+
## Connection to ELS for ansi-html Library
10+
11+
This guide outlines the steps needed to integrate the TuxCare ELS for the ansi-html library.
12+
13+
## Step 1: Get Token
14+
15+
You need a token in order to use TuxCare ELS ansi-html library. Anonymous access is disabled. To receive the token, please contact [[email protected]](mailto:[email protected]).
16+
17+
## Step 2: Set Up ELS for ansi-html
18+
19+
TuxCare provides ELS for ansi-html as an NPM package, hosted on a secure internal registry. Follow the steps below to add it to your project and get started.
20+
21+
1. Navigate to the root directory of your ansi-html project.
22+
2. Create a `.npmrc` file or update it if it already exists.
23+
24+
**Example:**
25+
26+
```text
27+
my-ansi-html-project/
28+
├── node_modules/
29+
├── package.json
30+
├── .npmrc ⚠️ ← Create it here
31+
└── package-lock.json
32+
```
33+
34+
3. Use an editor of your choice (e.g., VS Code) to add the following registry address line:
35+
36+
<CodeWithCopy>
37+
38+
```text
39+
registry=https://registry.npmjs.org/
40+
@els-js:registry=https://nexus.repo.tuxcare.com/repository/els_js/
41+
//nexus.repo.tuxcare.com/repository/els_js/:_auth=${TOKEN}
42+
```
43+
44+
</CodeWithCopy>
45+
46+
:::warning
47+
Replace ${TOKEN} with the token you received from [[email protected]](mailto:[email protected]).
48+
:::
49+
50+
4. Update your `package.json` file to replace your ansi-html dependencies with the TuxCare packages. You can do this in two ways:
51+
52+
* **Option 1: TuxCare Patcher (Automated)**
53+
54+
If you already have dependencies listed in your `package.json`, for example:
55+
56+
```text
57+
"dependencies": {
58+
"ansi-html": "^0.0.7"
59+
}
60+
```
61+
62+
Install the Patcher globally, then run the patcher command:
63+
64+
<CodeWithCopy>
65+
66+
```text
67+
npm install -g @els-js/tuxcare-patcher --userconfig ./.npmrc
68+
tuxcare-patch-js
69+
```
70+
71+
</CodeWithCopy>
72+
73+
The patcher will automatically update your `package.json` to:
74+
75+
```text
76+
"dependencies": {
77+
"ansi-html": "npm:@els-js/[email protected]"
78+
},
79+
"overrides": {
80+
81+
}
82+
```
83+
84+
* **Option 2: Manual Update**
85+
86+
Manually update your `package.json` file to use the TuxCare package:
87+
88+
<CodeWithCopy>
89+
90+
```text
91+
"dependencies": {
92+
"ansi-html": "npm:@els-js/[email protected]"
93+
}
94+
```
95+
96+
</CodeWithCopy>
97+
98+
5. You need to remove the `node_modules` directory and the `package-lock.json` file, and also clear the `npm cache` before installing the patched packages. Use the following commands:
99+
100+
<CodeWithCopy>
101+
102+
```text
103+
rm -rf node_modules package-lock.json && npm cache clean --force
104+
```
105+
106+
</CodeWithCopy>
107+
108+
6. Run the following command to install the ELS version of the ansi-html library (token for the TuxCare repository will be automatically picked up from your `.npmrc` file):
109+
110+
<CodeWithCopy>
111+
112+
```text
113+
npm install
114+
```
115+
116+
</CodeWithCopy>
117+
118+
You will see an output like:
119+
120+
```text
121+
added 1 package, and audited 2 packages in 792ms
122+
123+
found 0 vulnerabilities
124+
```
125+
126+
7. You've successfully installed the Tuxcare ELS version of the ansi-html library into your project.
127+
128+
## Vulnerability Exploitability eXchange (VEX)
129+
130+
VEX is a machine-readable format that tells you if a known vulnerability and is actually exploitable in your product. It reduces false positives, helps prioritize real risks.
131+
132+
TuxCare provides VEX for ansi-html ELS versions: [security.tuxcare.com/vex/cyclonedx/els_lang_javascript/ansi-html/](https://security.tuxcare.com/vex/cyclonedx/els_lang_javascript/ansi-html/).
133+
134+
## How to Upgrade to a Newer Version of TuxCare Packages
135+
136+
If you have already installed a package with a `tuxcare.1` suffix and want to upgrade to a newer release (for example, `tuxcare.2`), there are several options:
137+
138+
* **Option 1**. Run TuxCare Patcher to update all TuxCare packages in your `package.json`:
139+
140+
<CodeWithCopy>
141+
142+
```text
143+
tuxcare-patch-js --upgrade
144+
```
145+
146+
</CodeWithCopy>
147+
148+
* **Option 2**. Run the `npm install` command with the specific version. This will automatically update both `package.json` and `package-lock.json`:
149+
150+
<CodeWithCopy>
151+
152+
```text
153+
npm install ansi-html@npm:@els-js/[email protected]
154+
```
155+
156+
</CodeWithCopy>
157+
158+
* **Option 3**. Manually update the version string in your `package.json`, remove installed files and clear npm cache to avoid conflicts:
159+
160+
<CodeWithCopy>
161+
162+
```text
163+
rm -rf node_modules package-lock.json && npm cache clean --force
164+
npm install
165+
```
166+
167+
</CodeWithCopy>
168+
169+
## Resolved CVEs
170+
171+
Fixes for the following vulnerabilities are available in ELS for ansi-html from TuxCare versions:
172+
173+
| CVE ID | CVE Type | Severity | Affected Libraries | Vulnerable Versions |
174+
| :------------: | :------: |:--------:|:------------------:| :----------------: |
175+
| CVE-2021-23424 | Direct | High | ansi-html | < 0.0.8 |
176+
177+
If you are interested in the TuxCare Endless Lifecycle Support, contact [[email protected]](mailto:[email protected]).

0 commit comments

Comments
 (0)