Skip to content

Commit 907b9cb

Browse files
committed
bug:SP-3314 fixes local cryptography hints detection
1 parent 7c1b471 commit 907b9cb

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [0.24.0] (2025-09-23)
6+
### Bug
7+
- Fixed bug on local cryptography hints detection
8+
59
## [0.23.0] (2025-09-19)
610
### Bug
711
- Fixed bug in the cryptography scanner
@@ -154,3 +158,5 @@ All notable changes to this project will be documented in this file. See [standa
154158
### [0.21.0](https://github.com/scanoss/scanoss.js/compare/v0.18.0...v0.19.0) (2025-09-03)
155159
### [0.21.1](https://github.com/scanoss/scanoss.js/compare/v0.18.0...v0.19.0) (2025-09-03)
156160
### [0.22.0](https://github.com/scanoss/scanoss.js/compare/v0.18.0...v0.19.0) (2025-09-05)
161+
### [0.23.0](https://github.com/scanoss/scanoss.js/compare/v0.22.0...v0.23.0) (2025-09-19)
162+
### [0.24.0](https://github.com/scanoss/scanoss.js/compare/v0.23.0...v0.24.0) (2025-09-23)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scanoss",
3-
"version": "0.23.0",
3+
"version": "0.24.0",
44
"description": "The SCANOSS JS package provides a simple, easy to consume module for interacting with SCANOSS APIs/Engine.",
55
"main": "build/main/index.js",
66
"typings": "build/main/index.d.ts",

src/sdk/Cryptography/Algorithm/Files/AlgorithmProcessor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ parentPort.on('message', async (job) => {
1010
const cryptoFound = new Array();
1111
1212
let content = fs.readFileSync(file, 'utf-8');
13+
content = content.toLowerCase();
1314
rules.forEach((value, key) => {
1415
try {
1516
const matches = content.match(value);

src/sdk/Cryptography/Hint/Files/HintProcessor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ parentPort.on('message', async (job) => {
88
const { file, rules } = data;
99
1010
let content = fs.readFileSync(file, 'utf-8');
11+
content = content.toLowerCase();
1112
const hints = [];
1213
rules.forEach((rule) => {
1314
for (const keyword of rule.keywords) {
14-
if (content.includes(keyword)) {
15+
if (content.includes(keyword.toLowerCase())) {
1516
const {id, name, description, url , category, purl } = rule;
1617
hints.push({ id, name, category, purl, description, url });
1718
break;

0 commit comments

Comments
 (0)