-
Notifications
You must be signed in to change notification settings - Fork 3
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
Security scan result #94
Comments
Regarding the vulnerability scan given by Sanofi received on 2022-07-26, here is the status report at 2022-07-28 for the "HIGH CVEs" and "Legal risks" only. HIGH - Npm-debug-2.6.9 - #95 - the dependency has been overriden by debug-4.3.4 or higher, and has passed the automated tests for the future v0.10.3 candidate version. Although this situation is not desirable (the only "good" fix would be a fix by the upstream package express), the workaround does not seem to break so far. HIGH - Npm-inflight-1.0.6 - #96 - under analysis. There could be some workarounds, but the lead developer must be involved. HIGH - (OS packages) procps #97, file #98, git #101, openSSL #102 - None of these OS packages are in use in the runtime image since v0.9.6 (2022-06-01 - Docker base images changed from debian to alpine linux). So we are a bit confused where does this report comes from. HIGH Legal risks - xmldom - 0.1.15 - #103 - The requiring package was removed, and no additional visual defects where found on the future candidate release v0.10.3 (currently on https://fgt-dev.pharmaledger.pdmfc.com/ ). |
Removed old Dockerfiles ( a856314 ) as it might be confusing the scan tool. |
Regarding the SAST Alerts: (2) MEDIUM - Client_Privacy_Violation : Those outputs belong in test scripts, and are therefore are not ran in the docker images. Also, the credentials output are randomly generated for each test and have absolutely no relation with the actual credentials used to generate the wallets. Due to these reasons we intend to take no action since this does not pose any kind of security risk. If that important to the business we can delete the test files from the docker image; (4) MEDIUM - Missing_Encryption_of_Sensitive_Data - #106 - it's the responsibility of each participant to override these default credentials for their own. We will however convert this mechanism to an environment variable and use the credentials file as a fallback. this will probably force an update to the helm charts (the fallback mechanism allows for the current version to keep working until that change) (1) MEDIUM - Missing_HSTS_Header - #107 - The code is designed for http (not https). Makes no sense to add an Strict-Transport-Security header on an http response in this situation. When deploying a production environment, the solution will probably be wrapped by a reverse https-to-http proxy. It is up to that proxy to add the Strict-Transport-Security header if desired. (21) LOW - Client_Hardcoded_Domain - #108 - not a security problem at all. The files are never exposed to the web and exist only for testing purposes for CSS. we will however delete that folder to stop the false positives (1) LOW - Client_Use_Of_Iframe_Without_Sandbox - #109 - under analysis. we will add the adequate sandbox configs (this code comes from Romsoft and therefore should be extended to EPI and all other use cases)
(1) LOW - React_Deprecated - the provided example:
is standard code for Stencil based applications according to the documentation and examples. We have no indication of deprecation of any kind. Additional clarifications are required here. Until then, no actions will be taken |
Folders and files that are used only for testing purposes and are not exposed on the web are now filtered out from the security scan: |
Security scan results on commit 34ae845 filtering out test code mentioned above: Security Scan Report: PharmaLedger-IMI/fgt-workspaceCommit: 34ae845 Executive summaryYou'll find below a list of vulnerabilities identified by our service on both Static Application Security Testing and Software Composition Analysis dimensions:
🔴 NO-GO for production alertsSCA AlertsList of Packages with HIGH CVEsPackages detected HIGH - Npm-debug-4.3.4
Vulnerabilities:
HIGH - Npm-inflight-1.0.6
Vulnerabilities:
List of Container Packages with HIGH CVEsNO Container Packages detected List of Packages with HIGH Legal risksNO Packages detected SAST Alerts🔶 to be remediated within 90 daysSAST Alerts(4) MEDIUM - Missing_Encryption_of_Sensitive_DataCWE: 311(RECURRENT) Description:The sensitive data in credentialsFilePath at /fgt-api/tests/controls/utils.js in line 10 is stored in plain-text by readFileSync at /fgt-api/tests/controls/utils.js in line 10. try {
credentials = fs.readFileSync(credentialsFilePath);
credentials = JSON.parse(credentials);
} catch (e) {
(RECURRENT) Description:The sensitive data in credentialsFilePath at /fgt-api/tests/controls/utils.js in line 23 is stored in plain-text by readFileSync at /fgt-api/tests/controls/utils.js in line 23. try {
credentials = fs.readFileSync(credentialsFilePath);
credentials = JSON.parse(credentials);
} catch (e) {
(RECURRENT) Description:The sensitive data in CREDENTIALS_FILE at /fgt-api/server.js in line 74 is stored in plain-text by copyFileSync at /fgt-api/server.js in line 74. function overWriteCredentialsByRole(){
fs.copyFileSync(path.join(currentPath, "..", "docker", "api", "env", CREDENTIALS_FILE),
path.join(currentPath, "config", `fgt-${getWallet()}-wallet`, "credentials.json"))
}
(RECURRENT) Description:The sensitive data in secret at /dashboard-wizard/credential-export.js in line 88 is stored in plain-text by writeFile at /dashboard-wizard/credential-export.js in line 100. return new Promise((resolve, reject) => {
fs.writeFile(path.join(process.cwd(), "apihub-root/dashboard/identity.json"), JSON.stringify(data), err => err
? reject(err)
: resolve(data))
(1) MEDIUM - Missing_HSTS_HeaderCWE: 346(RECURRENT) Description:The web-application does not define an HSTS header, leaving it vulnerable to attack. try {
response = await response.json();
} catch (e) {
return callback(e)
(1) LOW - Client_Hardcoded_DomainCWE: 829(RECURRENT) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js" in /apihub-root/index.html at line 14 is from a remote domain, which may allow attackers to replace its contents with malicious code. </script>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
</head>
<body>
(1) LOW - Client_Use_Of_Iframe_Without_SandboxCWE: 829(RECURRENT) Description:The application employs an HTML iframe at whose contents are not properly sandboxed const buildContainerIframe = (useSeedForIframeSource) => {
const iframe = document.createElement("iframe");
//iframe.setAttribute("sandbox", "allow-scripts allow-same-origin allow-forms");
(1) LOW - Missing_CSP_HeaderCWE: 346(NEW) Description:A Content Security Policy is not explicitly defined within the web-application. res.statusCode = err.statusCode;
res.write(JSON.stringify({
status: err.statusCode,
error: err.message,
(1) LOW - React_DeprecatedCWE: 477(RECURRENT) Description:Method getInputElement in /pdm-web-components/src/components/managed-stock-product-input/managed-stock-product-input.tsx, at line 297, calls an obsolete API, CxAssociativeArray_55eeafc5. This has been deprecated, and should not be used in a modern codebase. return (
<input name={this.name} required={this.required} hidden={true} value={this.value}></input>
)
}
|
(1) LOW - Missing_CSP_Header - issue #110 |
Action points for medium and low SAS alerts:
PDM
|
(1) LOW - Client_Hardcoded_Domain - issue #111 - fixed |
Current PDM status (see the sub-issue for details):
|
Security Scan Report: PharmaLedger-IMI/fgt-workspace
Commit: fdd7c03
Executive summary
You'll find below a list of vulnerabilities identified by our service on both Static Application Security Testing and Software Composition Analysis dimensions:
🔴 NO-GO for production alerts
SCA Alerts
List of Packages with HIGH CVEs
Packages detected
HIGH - Npm-debug-2.6.9
Vulnerabilities:
debug before 4.3.0 has a memory leak when creating debug instances.
debug accepts a regular expression from user input without escaping it. Arbitrary regular expressions could be injected to cause a denial of service attack on the user's browser.
HIGH - Npm-inflight-1.0.6
Vulnerabilities:
In npm inflight there is a memory leak because some resources are not freed correctly after being used. It appears to affect all versions.
List of Container Packages with HIGH CVEs
Container Packages detected
HIGH - procps
HIGH - file
HIGH - git
git clone
. However, the affected URLs look rather suspicious; the likely vector would be through systems which automatically clone URLs not visible to the user, such as Git submodules, or package systems built around Git. The root of the problem is in Git itself, which should not be feeding blank input to helpers. However, the ability to exploit the vulnerability in practice depends on which helpers are in use. Credential helpers which are known to trigger the vulnerability: - Git's "store" helper - Git's "cache" helper - the "osxkeychain" helper that ships in Git's "contrib" directory Credential helpers which are known to be safe even with vulnerable versions of Git: - Git Credential Manager for Windows Any helper not in this list should be assumed to trigger the vulnerability.HIGH - openssl
List of Packages with HIGH Legal risks
Packages detected
xmldom - 0.1.15
Risks:
SAST Alerts
🔶 to be remediated within 90 days
SAST Alerts
(2) MEDIUM - Client_Privacy_Violation
CWE: 359
(NEW) Description:Method Cx31abc8fe at line 92 of /tests/wallet-test/AppBuilderTest.js sends user information outside the application. This may constitute a Privacy Violation.
(NEW) Description:Method Cx31abc8fe at line 96 of /tests/wallet-test/AppBuilderTest.js sends user information outside the application. This may constitute a Privacy Violation.
(4) MEDIUM - Missing_Encryption_of_Sensitive_Data
CWE: 311
(NEW) Description:The sensitive data in credentialsFilePath at /fgt-api/tests/controls/utils.js in line 23 is stored in plain-text by readFileSync at /fgt-api/tests/controls/utils.js in line 23.
(NEW) Description:The sensitive data in credentialsFilePath at /fgt-api/tests/controls/utils.js in line 10 is stored in plain-text by readFileSync at /fgt-api/tests/controls/utils.js in line 10.
(NEW) Description:The sensitive data in secret at /dashboard-wizard/credential-export.js in line 88 is stored in plain-text by writeFile at /dashboard-wizard/credential-export.js in line 100.
(NEW) Description:The sensitive data in CREDENTIALS_FILE at /fgt-api/server.js in line 74 is stored in plain-text by copyFileSync at /fgt-api/server.js in line 74.
(1) MEDIUM - Missing_HSTS_Header
CWE: 346
(NEW) Description:The web-application does not define an HSTS header, leaving it vulnerable to attack.
(21) LOW - Client_Hardcoded_Domain
CWE: 829
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.esm.js" in /static-pages/add-product.html at line 8 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.esm.js" in /static-pages/index.html at line 8 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/ionicons/dist/ionicons/ionicons.js" in /static-pages/add-product.html at line 13 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.js" in /static-pages/add-product.html at line 9 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in https://cdn.jsdelivr.net/npm/@ionic/core/css/ionic.bundle.css in /static-pages/tree-view/tree-view.html at line 10 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in https://cdn.jsdelivr.net/npm/@ionic/core/css/ionic.bundle.css in /static-pages/products.html at line 10 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in https://cdn.jsdelivr.net/npm/@ionic/core/css/ionic.bundle.css in /static-pages/index.html at line 10 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in https://cdn.jsdelivr.net/npm/@ionic/core/css/ionic.bundle.css in /static-pages/add-product.html at line 10 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/ionicons/dist/ionicons/ionicons.js" in /static-pages/tree-view/tree-view.html at line 13 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/ionicons/dist/ionicons/ionicons.esm.js" in /static-pages/tree-view/tree-view.html at line 12 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.js" in /static-pages/tree-view/tree-view.html at line 9 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.esm.js" in /static-pages/tree-view/tree-view.html at line 8 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/ionicons/dist/ionicons/ionicons.js" in /static-pages/products.html at line 13 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/ionicons/dist/ionicons/ionicons.esm.js" in /static-pages/products.html at line 12 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.js" in /static-pages/products.html at line 9 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.esm.js" in /static-pages/products.html at line 8 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/ionicons/dist/ionicons/ionicons.js" in /static-pages/index.html at line 13 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/ionicons/dist/ionicons/ionicons.esm.js" in /static-pages/add-product.html at line 12 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js" in /apihub-root/index.html at line 14 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/ionicons/dist/ionicons/ionicons.esm.js" in /static-pages/index.html at line 12 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(NEW) Description:The JavaScript file imported in "https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.js" in /static-pages/index.html at line 9 is from a remote domain, which may allow attackers to replace its contents with malicious code.
(1) LOW - Client_Use_Of_Iframe_Without_Sandbox
CWE: 829
(NEW) Description:The application employs an HTML iframe at whose contents are not properly sandboxed
(1) LOW - Missing_CSP_Header
CWE: 346
(NEW) Description:A Content Security Policy is not explicitly defined within the web-application.
(1) LOW - React_Deprecated
CWE: 477
(NEW) Description:Method getInputElement in /pdm-web-components/src/components/managed-stock-product-input/managed-stock-product-input.tsx, at line 264, calls an obsolete API, CxAssociativeArray_1daa212e. This has been deprecated, and should not be used in a modern codebase.
The text was updated successfully, but these errors were encountered: