Skip to content

Conversation

olivmath
Copy link
Owner

@olivmath olivmath commented Feb 1, 2024

No description provided.

@olivmath olivmath added the feat Adds a feature that didn't exist before label Feb 1, 2024
@olivmath olivmath added this to the FFI milestone Feb 1, 2024
@olivmath olivmath self-assigned this Feb 1, 2024
@@ -0,0 +1,10 @@
import subprocess

Check notice

Code scanning / Bandit

Consider possible security implications associated with the subprocess module.

Consider possible security implications associated with the subprocess module.
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@olivmath olivmath linked an issue Feb 1, 2024 that may be closed by this pull request
def install_js_deps(request):
if any("merkletreejs" in item.keywords for item in request.session.items):
print("Install js dependencies")
subprocess.run(["yarn"], cwd="./test/merkletreejs", check=True)

Check notice

Code scanning / Bandit

Starting a process with a partial executable path

Starting a process with a partial executable path
def install_js_deps(request):
if any("merkletreejs" in item.keywords for item in request.session.items):
print("Install js dependencies")
subprocess.run(["yarn"], cwd="./test/merkletreejs", check=True)

Check notice

Code scanning / Bandit

subprocess call - check for execution of untrusted input.

subprocess call - check for execution of untrusted input.
def compile_rust_ffi(request):
if any("ffi" in item.keywords for item in request.session.items):
print("Compiling Rust FFI")
result = subprocess.run(

Check notice

Code scanning / Bandit

subprocess call - check for execution of untrusted input.

subprocess call - check for execution of untrusted input.
print("Status:", result.returncode)
print("Output:", result.stdout)
print("Error:", result.stderr)
assert result.returncode == 0, "Falha ao compilar o código Rust"

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
root = tree.root
result = treers.make_root(leaves_bytes)

assert list(root) == list(result)

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.

proof = tree.proof("a")
result = treers.make_proof(leaves_bytes, leaves_bytes[0])
assert proof == result

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Adds a feature that didn't exist before
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mekle Root FFI
1 participant