-
Notifications
You must be signed in to change notification settings - Fork 3
Example image conversion route merge #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| private curEnv: string = config.util.getEnv('NODE_ENV'); | ||
| public apiVersion: string = config.get('App.apiConfig.version') || 'v1'; | ||
| public privateKey: string = '-----BEGIN RSA PRIVATE KEY-----\r\nMIICXAIBAAKBgQDNwqLEe9wgTXCbC7+RPdDbBbeqjdbs4kOPOIGzqLpXvJXlxxW8iMz0EaM4BKUqYsIa+ndv3NAn2RxCd5ubVdJJcX43zO6Ko0TFEZx/65gY3BE0O6syCEmUP4qbSd6exou/F+WTISzbQ5FBVPVmhnYhG/kpwt/cIxK5iUn5hm+4tQIDAQABAoGBAI+8xiPoOrA+KMnG/T4jJsG6TsHQcDHvJi7o1IKC/hnIXha0atTX5AUkRRce95qSfvKFweXdJXSQ0JMGJyfuXgU6dI0TcseFRfewXAa/ssxAC+iUVR6KUMh1PE2wXLitfeI6JLvVtrBYswm2I7CtY0q8n5AGimHWVXJPLfGV7m0BAkEA+fqFt2LXbLtyg6wZyxMA/cnmt5Nt3U2dAu77MzFJvibANUNHE4HPLZxjGNXN+a6m0K6TD4kDdh5HfUYLWWRBYQJBANK3carmulBwqzcDBjsJ0YrIONBpCAsXxk8idXb8jL9aNIg15Wumm2enqqObahDHB5jnGOLmbasizvSVqypfM9UCQCQl8xIqy+YgURXzXCN+kwUgHinrutZms87Jyi+D8Br8NY0+Nlf+zHvXAomD2W5CsEK7C+8SLBr3k/TsnRWHJuECQHFE9RA2OP8WoaLPuGCyFXaxzICThSRZYluVnWkZtxsBhW2W8z1b8PvWUE7kMy7TnkzeJS2LSnaNHoyxi7IaPQUCQCwWU4U+v4lD7uYBw00Ga/xt+7+UqFPlPVdz1yyr4q24Zxaw0LgmuEvgU5dycq8N7JxjTubX0MIRR+G9fmDBBl8=\r\n-----END RSA PRIVATE KEY-----' | ||
| public anotherPrivateKey: string = '-----BEGIN RSA PRIVATE KEY-----\r\nMIICXAIBAAKBgQDNwqLEe9wgTXCbC7+RPdDbBbeqjdbs4kOPOIGzqLpXvJXlxxW8iMz0EaM4BKUqYsIa+ndv3NAn2RxCd5ubVdJJcX43zO6Ko0TFEZx/65gY3BE0O6syCEmUP4qbSd6exou/F+WTISzbQ5FBVPVmhnYhG/kpwt/cIxK5iUn5hm+4tQIDAQABAoGBAI+8xiPoOrA+KMnG/T4jJsG6TsHQcDHvJi7o1IKC/hnIXha0atTX5AUkRRce95qSfvKFweXdJXSQ0JMGJyfuXgU6dI0TcseFRfewXAa/ssxAC+iUVR6KUMh1PE2wXLitfeI6JLvVtrBYswm2I7CtY0q8n5AGimHWVXJPLfGV7m0BAkEA+fqFt2LXbLtyg6wZyxMA/cnmt5Nt3U2dAu77MzFJvibANUNHE4HPLZxjGNXN+a6m0K6TD4kDdh5HfUYLWWRBYQJBANK3carmulBwqzcDBjsJ0YrIONBpCAsXxk8idXb8jL9aNIg15Wumm2enqqObahDHB5jnGOLmbasizvSVqypfM9UCQCQl8xIqy+YgURXzXCN+kwUgHinrutZms87Jyi+D8Br8NY0+Nlf+zHvXAomD2W5CsEK7C+8SLBr3k/TsnRWHJuECQHFE9RA2OP8WoaLPuGCyFXaxzICThSRZYluVnWkZtxsBhW2W8z1b8PvWUE7kMy7TnkzeJS2LSnaNHoyxi7IaPQUCQCwWU4U+v4lD7uYBw00Ga/xt+7+UqFPlPVdz1yyr4q24Zxaw0LgmuEvgU5dycq8N7JxjTubX0MIRR+G9fmDBBl8=\r\n-----END RSA PRIVATE KEY-----' |
Check failure
Code scanning / Fortify on Demand
Key Management: Hardcoded Encryption Key Critical
| } | ||
| */ | ||
|
|
||
| fs.writeFileSync(`/tmp/upload/${request.body.name}`, request.body.data || ''); |
Check failure
Code scanning / Fortify on Demand
Path Manipulation Critical
| } | ||
| */ | ||
|
|
||
| fs.writeFileSync(`/tmp/upload/${request.body.name}`, request.body.data || ''); |
Check failure
Code scanning / Fortify on Demand
Path Manipulation Critical
| type: 'jpeg' | ||
| }).then((response: { sendStatus: (arg0: number) => any; }) => { | ||
| // Command injection example | ||
| exec('rm /tmp/upload/${request.body.name}'); |
Check failure
Code scanning / Fortify on Demand
Command Injection Critical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fortify vulnerability summary
Any issues listed below are based on comparing the latest scan results against the previous scan results in FoD release IWA-API-Node [KAL] - 2/merge. This is for informational purposes only and, depending on workflow, may not be an accurate representation of what issues will be introduced into or removed from the target branch when merging this PR.
New Issues
- No new or re-introduced issues were detected
Removed Issues
- No removed issues were detected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fortify vulnerability summary
Any issues listed below are based on comparing the latest scan results against the previous scan results in FoD release IWA-API-Node [KAL] - 2/merge. This is for informational purposes only and, depending on workflow, may not be an accurate representation of what issues will be introduced into or removed from the target branch when merging this PR.
New Issues
- New (Static) - Command Injection:
Src/src/utils/image.utils.ts:167 - New (Static) - Command Injection:
Src/src/routes/site.routes.ts:167 - New (Static) - Command Injection:
Src/src/utils/file.utils.ts:76 - New (Static) - Command Injection:
Src/src/utils/file.utils.ts:76 - New (Static) - Command Injection:
Src/src/utils/file.utils.ts:76 - New (Static) - Cookie Security: Cookie not Sent Over SSL:
Src/src/controllers/site.controller.ts:77 - New (Static) - Credential Management: Hardcoded API Credentials:
Src/src/middleware/authorization.handler.ts:32 - New (Static) - Dockerfile Misconfiguration: Default User Privilege:
Src/Dockerfile:1 - New (Static) - Dockerfile Misconfiguration: Dependency Confusion:
Src/Dockerfile:1 - New (Static) - Insecure Transport:
Src/src/index.ts:41 - New (Static) - JSON Injection:
Src/src/controllers/site.controller.ts:96 - New (Static) - JSON Injection:
Src/src/controllers/site.controller.ts:124 - New (Static) - JSON Injection:
Src/src/controllers/site.controller.ts:124 - New (Static) - JSON Injection:
Src/src/controllers/site.controller.ts:124 - New (Static) - JSON Injection:
Src/src/controllers/site.controller.ts:96 - New (Static) - JSON Injection:
Src/src/controllers/site.controller.ts:96 - New (Static) - Key Management: Empty Encryption Key:
Src/src/utils/encrypt.utils.ts:26 - New (Static) - Key Management: Hardcoded Encryption Key:
Src/src/configs/app.config.ts:50 - New (Static) - Key Management: Hardcoded Encryption Key:
Src/src/configs/app.config.ts:50 - New (Static) - Key Management: Hardcoded Encryption Key:
Src/src/configs/app.config.ts:51 - New (Static) - Password Management: Hardcoded Password:
Src/config/test.json:7 - New (Static) - Password Management: Hardcoded Password:
Src/config/production.json:7 - New (Static) - Password Management: Hardcoded Password:
Src/src/configs/app.config.ts:100 - New (Static) - Password Management: Hardcoded Password:
Src/config/default.json:11 - New (Static) - Password Management: Password in Configuration File:
Src/etc/IWA-API_development_scan_settings.xml:469 - New (Static) - Password Management: Password in Configuration File:
Src/etc/IWA-API_development_scan_settings.xml:1042 - New (Static) - Path Manipulation:
Src/src/routes/site.routes.ts:157 - New (Static) - Path Manipulation:
Src/src/controllers/product.controller.ts:95 - New (Static) - Path Manipulation:
Src/src/utils/image.utils.ts:157 - New (Static) - Path Manipulation:
Src/src/controllers/product.controller.ts:95 - New (Static) - Privacy Violation:
Src/src/middleware/authentication.handler.ts:57 - New (Static) - Privacy Violation:
Src/mongodb/populateDb.js:38 - New (Static) - Privacy Violation:
Src/src/middleware/authentication.handler.ts:37 - New (Static) - Privacy Violation:
Src/src/utils/encrypt.utils.ts:39 - New (Static) - Privacy Violation:
Src/src/utils/encrypt.utils.ts:52 - New (Static) - Weak Encryption:
Src/src/utils/encrypt.utils.ts:31
Removed Issues
- No removed issues were detected
No description provided.