debugged sudden failure to download sarif results. Cause: gh.HTTPClient(nil)

Switch
client, err := gh.HTTPClient(nil)
to
client := &http.Client{}
and everything works again
This commit is contained in:
2025-05-19 13:50:57 -07:00
parent 80dbf9f299
commit af46dd6fa4
2 changed files with 16 additions and 20 deletions

View File

@@ -299,14 +299,14 @@
- server
#+BEGIN_SRC sh
#* Cross-compile locally
cd ~/work-gh/mrva/mrvaserver
cd /Users/hohn/work-gh/mrva/mrvaserver
make msla
#* check for running containers
docker ps --format "table {{.ID}}\t{{.Image}}\t{{.Names}}"
#* Copy the new binary
cd ~/work-gh/mrva/mrvaserver
cd /Users/hohn/work-gh/mrva/mrvaserver
docker cp mrvaserver mrva-server:/usr/local/bin/mrvaserver
#* Restart the binary
@@ -316,14 +316,14 @@
- agent
#+BEGIN_SRC sh
#* Cross-compile locally
cd ~/work-gh/mrva/mrvaagent
cd /Users/hohn/work-gh/mrva/mrvaagent
make mala
#* Look for the agent's name in the process table
docker ps --format "table {{.ID}}\t{{.Image}}\t{{.Names}}"
#* Copy the new binary
cd ~/work-gh/mrva/mrvaagent
cd /Users/hohn/work-gh/mrva/mrvaagent
docker cp mrvaagent mrva-agent:/usr/local/bin/mrvaagent
#* Restart the binary
@@ -333,7 +333,7 @@
- gh-mrva
#+BEGIN_SRC sh
#* Cross-compile locally
cd ~/work-gh/mrva/gh-mrva
cd /Users/hohn/work-gh/mrva/gh-mrva
go mod edit -replace="github.com/GitHubSecurityLab/gh-mrva=/Users/hohn/work-gh/mrva/gh-mrva"
go mod tidy
GOOS=linux GOARCH=arm64 go build
@@ -341,18 +341,11 @@
#* Look for the gh-mrva name in the process table
docker ps --format "table {{.ID}}\t{{.Image}}\t{{.Names}}"
#* Copy the new binary
cd ~/work-gh/mrva/gh-mrva
docker cp mrvaagent mrva-agent:/usr/local/bin/mrvaagent
#* Restart the binary
docker exec mrva-agent pkill mrvaagent
cd /Users/hohn/work-gh/mrva/gh-mrva
docker cp gh-mrva mrva-ghmrva:/usr/local/bin/gh-mrva
#+END_SRC
** Use gh-mrva container to send request via cli
*** Start container and check gh-mrva tool
#+BEGIN_SRC sh

View File

@@ -74,7 +74,7 @@ gh-mrva download --session mirva-session-2372 \
--output-dir mirva-session-2372
#** Set up QLPack for the next query
#* Set up QLPack for the next query
# Create a qlpack.yml file required for the next query
cat > ~/work-gh/mrva/gh-mrva/qlpack.yml <<eof
library: false
@@ -106,19 +106,22 @@ eof
# Submit a new MRVA job with the second query
cd ~/work-gh/mrva/gh-mrva/
gh-mrva submit \
--language cpp --session mirva-session-2261 \
--language cpp --session mirva-session-2661 \
--list mirva-list \
--query ~/work-gh/mrva/gh-mrva/Fprintf.ql
# Check the status of the second session
gh-mrva status --session mirva-session-2261
gh-mrva status --session mirva-session-2661
# Download SARIF files and databases for the second query
cd ~/work-gh/mrva/gh-mrva/
gh-mrva download --session mirva-session-2261 \
gh-mrva download --session mirva-session-2661 \
--download-dbs \
--output-dir mirva-session-2261
--output-dir mirva-session-2661
ls -l mirva-session-2261
gh-mrva download --session mirva-session-2661 \
--output-dir mirva-session-2661
ls -l mirva-session-2661