Sync upstream: optimized v3 circuit + gnark security upgrade - #6
Sync upstream: optimized v3 circuit + gnark security upgrade#6stackchain wants to merge 26 commits into
Conversation
…-mainnet-builtins-optimized-scripts Optimize Plutus V3 contracts for mainnet builtins
…t-one-shot-params-policy fix(contracts): compact one-shot params policy
…ovider-eval-for-preprod-deploy fix(web): use Scalus for PV11 local evaluation
…-optimized-preprod-references
…sia-Labs#48) Reviewed preparation merge for the guarded ownership-destination-v3 Preprod rollout.
…zed-circuit-preprod-cutover-tested Release optimized destination circuit to Preprod
…nark upgrade) into Emurgo fork
|
|
||
| async function initRuntime(msg) { | ||
| const msmCompile = compileMSMWorkerModule(msg.msmWorkerWasmUrl).catch(() => null); | ||
| importScripts(msg.wasmExecUrl); |
|
|
||
| async function initRuntime(msg) { | ||
| const msmCompile = compileMSMWorkerModule(msg.msmWorkerWasmUrl).catch(() => null); | ||
| importScripts(msg.wasmExecUrl); |
|
|
||
| func digestConstraintSystem(ccs constraint.ConstraintSystem) (ceremonyDigest, error) { | ||
| func writeAndDigestConstraintSystem(ccs constraint.ConstraintSystem, outputPath string) (ceremonyDigest, error) { | ||
| f, err := os.OpenFile(outputPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o600) |
There was a problem hiding this comment.
Potential file inclusion attack via reading file - high severity
If an attacker can control the input leading into the ReadFile function, they might be able to read sensitive files and launch further attacks with that information.
Show fix
| f, err := os.OpenFile(outputPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o600) | |
| for _, seg := range strings.Split(filepath.ToSlash(outputPath), "/") { | |
| if seg == ".." { | |
| return ceremonyDigest{}, fmt.Errorf("invalid file path") | |
| } | |
| } | |
| f, err := os.OpenFile(outputPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o600) |
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
| async function compileMSMWorkerModule(url) { | ||
| if (!url) return null; | ||
| if (typeof WebAssembly.compileStreaming === 'function') { | ||
| return await WebAssembly.compileStreaming(fetch(url)); |
There was a problem hiding this comment.
HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.
Show fix
Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
| if (typeof WebAssembly.compileStreaming === 'function') { | ||
| return await WebAssembly.compileStreaming(fetch(url)); | ||
| } | ||
| return await WebAssembly.compile(await (await fetch(url)).arrayBuffer()); |
There was a problem hiding this comment.
HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.
Show fix
Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
| go.env.GOMEMLIMIT = msg.gomemlimit ? String(msg.gomemlimit) : '3000MiB'; | ||
| let instance; | ||
| if (typeof WebAssembly.instantiateStreaming === 'function') { | ||
| const result = await WebAssembly.instantiateStreaming(fetch(msg.wasmUrl), go.importObject); |
There was a problem hiding this comment.
HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.
Show fix
Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
| const result = await WebAssembly.instantiateStreaming(fetch(msg.wasmUrl), go.importObject); | ||
| instance = result.instance; | ||
| } else { | ||
| const bytes = await (await fetch(msg.wasmUrl)).arrayBuffer(); |
There was a problem hiding this comment.
HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.
Show fix
Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
| async function compileMSMWorkerModule(url) { | ||
| if (!url) return null; | ||
| if (typeof WebAssembly.compileStreaming === 'function') { | ||
| return await WebAssembly.compileStreaming(fetch(url)); |
There was a problem hiding this comment.
HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.
Show fix
Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
| if (typeof WebAssembly.compileStreaming === 'function') { | ||
| return await WebAssembly.compileStreaming(fetch(url)); | ||
| } | ||
| return await WebAssembly.compile(await (await fetch(url)).arrayBuffer()); |
There was a problem hiding this comment.
HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.
Show fix
Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
| go.env.GOMEMLIMIT = msg.gomemlimit ? String(msg.gomemlimit) : '3000MiB'; | ||
| let instance; | ||
| if (typeof WebAssembly.instantiateStreaming === 'function') { | ||
| const result = await WebAssembly.instantiateStreaming(fetch(msg.wasmUrl), go.importObject); |
There was a problem hiding this comment.
HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.
Show fix
Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
| const result = await WebAssembly.instantiateStreaming(fetch(msg.wasmUrl), go.importObject); | ||
| instance = result.instance; | ||
| } else { | ||
| const bytes = await (await fetch(msg.wasmUrl)).arrayBuffer(); |
There was a problem hiding this comment.
HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.
Show fix
Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
| "required_global_credential": "a4da74e7cb6ea4f4e60456a0a6eabf0ccf83464ebe55664390ef39f8" | ||
| "address": "addr_test1wqrafz79yssrysfer2pan35dxvdqlsw5ce202wn7nrt3f5qgsahq2", | ||
| "script_hash": "07d48bc524203241391a83d9c68d331a0fc1d4c654f53a7e98d714d0", | ||
| "required_global_credential": "11a14098f4b579a34ee8309e3c2733fd449e61ca1287b3d20f68e2de" |
There was a problem hiding this comment.
Exposed secret in apps/ownership-proof-web/public/proof-assets/reclaim-deployment.json - high severity
Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More Info
| "reclaim_base": { | ||
| "address": "addr_test1wqcdkvd4awd955tyug4gllatykxclrcmxyrfye4s5s8hj8cjy7xda", | ||
| "script_hash": "30db31b5eb9a5a5164e22a8fffab258d8f8f1b31069266b0a40f791f", | ||
| "required_global_credential": "0ba0ad6b8ead49c5df537b90f7089448ee1dc95c949f35ca0a550bf1" |
There was a problem hiding this comment.
Exposed secret in apps/ownership-proof-web/public/proof-releases/proof-assets-ownership-destination-v2-preprod-9fac96b-g3a-2m-reclaim-30db31b5-r1/assets/reclaim-deployment.json - low severity
Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More Info
| "reclaim_base": { | ||
| "address": "addr_test1wqrafz79yssrysfer2pan35dxvdqlsw5ce202wn7nrt3f5qgsahq2", | ||
| "script_hash": "07d48bc524203241391a83d9c68d331a0fc1d4c654f53a7e98d714d0", | ||
| "required_global_credential": "11a14098f4b579a34ee8309e3c2733fd449e61ca1287b3d20f68e2de" |
There was a problem hiding this comment.
Exposed secret in apps/ownership-proof-web/public/proof-releases/proof-assets-ownership-destination-v3-preprod-191ca93-opt-reclaim-07d48bc5-r1/assets/reclaim-deployment.json - low severity
Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More Info
Summary
Anastasia-Labs/proof-toolmain(3b37efe) into the Emurgo fork.ownership-destination-v3circuit.proof-assets-ownership-destination-v3-preprod-191ca93-opt-reclaim-07d48bc5-r1(new reclaim deployment07d48bc5…, PK down to ~1.07 GB) that claim-fe will pin.Test plan
bun run prepare-proof-tool+ build against the new release pin