Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/gams-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Verify GAMS solver options

on:
workflow_dispatch:

permissions:
contents: read

jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout oximo
uses: actions/checkout@v6
with:
persist-credentials: false

- name: Checkout gams_scraper
uses: actions/checkout@v6
with:
repository: Godwinss24/GAM-SOLVERS
path: gams_scraper
Comment on lines +18 to +22

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Pin the external gams_scraper checkout to a specific commit.

The workflow checks out Godwinss24/GAM-SOLVERS at its default branch tip and then executes that code via cargo run. If the external repo is compromised, arbitrary code runs in CI with the workflow's token. Pin to a specific commit SHA and document the update process.

🔒️ Proposed fix
       - name: Checkout gams_scraper
         uses: actions/checkout@v4
         with:
           repository: Godwinss24/GAM-SOLVERS
+          ref: <pinned-commit-sha>
           path: gams_scraper
           persist-credentials: false
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 13-17: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/gams-sync.yml around lines 13 - 17, Update the “Checkout
gams_scraper” action to pin the Godwinss24/GAM-SOLVERS checkout to a specific
trusted commit SHA instead of the default branch tip, and add a brief comment
documenting that the SHA must be deliberately reviewed and updated when
upgrading the dependency.

persist-credentials: false

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Run scraper for each solver
run: |
mkdir -p /tmp/scraped
for solver in BARON GUROBI HIGHS; do
echo "Scraping $solver..."
cargo run --manifest-path gams_scraper/Cargo.toml -- "$solver" > "/tmp/scraped/${solver}.txt"
done

- name: Diff against checked-in snapshots
run: |
for solver in BARON GUROBI HIGHS; do
snapshot="snapshots/${solver,,}.txt"
new="/tmp/scraped/${solver}.txt"
if [ ! -f "$snapshot" ]; then
echo "No snapshot for $solver yet, skipping diff."
continue
fi
echo "Checking $solver..."
diff "$snapshot" "$new" || {
echo "::error::$solver options are out of date. Regenerate and update ${snapshot} and the corresponding options.rs."
exit 1
}
done
Comment thread
coderabbitai[bot] marked this conversation as resolved.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ members = [
"crates/oximo-autodiff",
"crates/oximo",
]
exclude = ["gams_scraper"]

[workspace.package]
version = "0.4.0"
Expand Down
63 changes: 63 additions & 0 deletions snapshots/baron.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// BARON
(dbl, abs_con_feas_tol, AbsConFeasTol),
(dbl, abs_int_feas_tol, AbsIntFeasTol),
(dbl, box_tol, BoxTol),
(str, cut_off, CutOff),
(str, delta_a, DeltaA),
(int, delta_r, DeltaR),
(int, delta_t, DeltaT),
(int, delta_term, DeltaTerm),
(str, eps_a, EpsA),
(str, eps_r, EpsR),
(int, first_feas, FirstFeas),
(int, first_loc, FirstLoc),
(dbl, is_ol_tol, IsOlTol),
(str, max_iter, MaxIter),
(str, max_time, MaxTime),
(int, num_sol, NumSol),
(int, rel_con_feas_tol, RelConFeasTol),
(int, rel_int_feas_tol, RelIntFeasTol),
(int, nouter1, Nouter1),
(int, nout_iter, NoutIter),
(int, nout_per_var, NoutPerVar),
(int, out_grid, OutGrid),
(str, threads, Threads),
(int, lbttd_o, LbttdO),
(int, md_o, MdO),
(int, obttd_o, ObttdO),
(int, pd_o, PdO),
(int, td_o, TdO),
(int, br_pt_stra, BrPtStra),
(int, br_var_stra, BrVarStra),
(int, node_sel, NodeSel),
(int, do_local, DoLocal),
(int, num_loc, NumLoc),
(int, loc_res, LocRes),
(int, prfreq, Prfreq),
(int, prlevel, Prlevel),
(int, prtimefreq, Prtimefreq),
(int, allow_cbc, AllowCbc),
(int, allow_cplex, AllowCplex),
(int, allow_external, AllowExternal),
(int, allow_filter_sd, AllowFilterSd),
(int, allow_filter_sqp, AllowFilterSqp),
(int, allow_hsl, AllowHsl),
(int, allow_ipopt, AllowIpopt),
(int, allow_minos, AllowMinos),
(int, allow_snopt, AllowSnopt),
(int, allow_xpress, AllowXpress),
(str, ext_nlp_solver, ExtNlpSolver),
(int, lpa_lg, LpaLg),
(int, lps_ol, LpsOl),
(int, nlps_ol, NlpsOl),
(int, comp_iis, CompIis),
(int, dual_budget, DualBudget),
(int, iisi_nt, IisiNt),
(int, iiso_rder, IisoRder),
(int, seed, Seed),
(str, want_dual, WantDual),
(str, bar_name, BarName),
(str, clock_type, ClockType),
(int, equ_class, EquClass),
(str, gdxo_ut, GdxoUt),
(int, inf_bnd, InfBnd),
210 changes: 210 additions & 0 deletions snapshots/gurobi.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
// GUROBI
(dbl, bariterlimit, Bariterlimit),
(str, bestbdstop, Bestbdstop),
(str, bestobjstop, Bestobjstop),
(str, cutoff, Cutoff),
(dbl, iterationlimit, Iterationlimit),
(str, memlimit, Memlimit),
(int, nlbariterlimit, Nlbariterlimit),
(str, nodelimit, Nodelimit),
(str, pdhgiterlimit, Pdhgiterlimit),
(str, softmemlimit, Softmemlimit),
(str, solutionlimit, Solutionlimit),
(str, timelimit, Timelimit),
(str, worklimit, Worklimit),
(dbl, barconvtol, Barconvtol),
(dbl, barqcpconvtol, Barqcpconvtol),
(dbl, feasibilitytol, Feasibilitytol),
(dbl, intfeastol, Intfeastol),
(dbl, markowitztol, Markowitztol),
(str, mipgap, Mipgap),
(str, mipgapabs, Mipgapabs),
(dbl, nlbarcfeastol, Nlbarcfeastol),
(dbl, nlbardfeastol, Nlbardfeastol),
(dbl, nlbarpfeastol, Nlbarpfeastol),
(dbl, optimalitytol, Optimalitytol),
(dbl, pdhgabstol, Pdhgabstol),
(dbl, pdhgconvtol, Pdhgconvtol),
(dbl, pdhgreltol, Pdhgreltol),
(dbl, psdtol, Psdtol),
(int, displayinterval, Displayinterval),
(str, solfiles, Solfiles),
(int, aggfill, Aggfill),
(int, aggregate, Aggregate),
(int, dualreductions, Dualreductions),
(int, precrush, Precrush),
(int, predeprow, Predeprow),
(int, predual, Predual),
(int, premiqcpform, Premiqcpform),
(int, prepasses, Prepasses),
(int, preqlinearize, Preqlinearize),
(int, presolve, Presolve),
(int, presos1bigm, Presos1bigm),
(int, presos1encoding, Presos1encoding),
(int, presos2bigm, Presos2bigm),
(int, presos2encoding, Presos2encoding),
(int, presparsify, Presparsify),
(int, lpwarmstart, Lpwarmstart),
(int, method, Method),
(int, networkalg, Networkalg),
(int, normadjust, Normadjust),
(dbl, perturbvalue, Perturbvalue),
(int, quad, Quad),
(int, sifting, Sifting),
(int, siftmethod, Siftmethod),
(int, simplexpricing, Simplexpricing),
(int, barcorrectors, Barcorrectors),
(int, barhomogeneous, Barhomogeneous),
(int, barorder, Barorder),
(int, crossover, Crossover),
(int, crossoverbasis, Crossoverbasis),
(int, qcpdual, Qcpdual),
(int, objscale, Objscale),
(int, scaleflag, Scaleflag),
(int, branchdir, Branchdir),
(int, concurrentjobs, Concurrentjobs),
(int, concurrentmethod, Concurrentmethod),
(int, concurrentmip, Concurrentmip),
(int, degenmoves, Degenmoves),
(int, disconnected, Disconnected),
(int, distributedmipjobs, Distributedmipjobs),
(str, dumpbcsol, Dumpbcsol),
(str, fixoptfile, Fixoptfile),
(int, fixvarsinindicators, Fixvarsinindicators),
(dbl, heuristics, Heuristics),
(int, improvestartgap, Improvestartgap),
(str, improvestartnodes, Improvestartnodes),
(str, improvestarttime, Improvestarttime),
(str, improvestartwork, Improvestartwork),
(int, integralityfocus, Integralityfocus),
(int, lazy, Lazy),
(int, lazyconstraints, Lazyconstraints),
(int, minrelnodes, Minrelnodes),
(int, mipfocus, Mipfocus),
(int, mipstart, Mipstart),
(str, mipstopexpr, Mipstopexpr),
(int, mipstopexprnodestep, Mipstopexprnodestep),
(dbl, mipstopexprsolutiontol, Mipstopexprsolutiontol),
(int, mipstopexprtimestep, Mipstopexprtimestep),
(int, mipstopexprverbosity, Mipstopexprverbosity),
(int, miqcpmethod, Miqcpmethod),
(str, multimipstart, Multimipstart),
(int, nlpheur, Nlpheur),
(str, nodefiledir, Nodefiledir),
(str, nodefilestart, Nodefilestart),
(int, nodemethod, Nodemethod),
(int, nonconvex, Nonconvex),
(int, norelheursolutions, Norelheursolutions),
(int, norelheurtime, Norelheurtime),
(int, norelheurwork, Norelheurwork),
(int, obbt, Obbt),
(int, partition, Partition),
(int, partitionplace, Partitionplace),
(int, prior, Prior),
(int, pumppasses, Pumppasses),
(int, rins, Rins),
(str, solnpool, Solnpool),
(str, solnpoolmerge, Solnpoolmerge),
(int, solnpoolnumsym, Solnpoolnumsym),
(str, solnpoolprefix, Solnpoolprefix),
(int, solvefixed, Solvefixed),
(int, startnodelimit, Startnodelimit),
(str, starttimelimit, Starttimelimit),
(str, startworklimit, Startworklimit),
(int, submipnodes, Submipnodes),
(int, symmetry, Symmetry),
(int, varbranch, Varbranch),
(int, zeroobjnodes, Zeroobjnodes),
(int, bqpcuts, Bqpcuts),
(int, cliquecuts, Cliquecuts),
(int, covercuts, Covercuts),
(int, cutaggpasses, Cutaggpasses),
(int, cutpasses, Cutpasses),
(int, cuts, Cuts),
(int, dualimpliedcuts, Dualimpliedcuts),
(int, flowcovercuts, Flowcovercuts),
(int, flowpathcuts, Flowpathcuts),
(int, gomorypasses, Gomorypasses),
(int, gubcovercuts, Gubcovercuts),
(int, impliedcuts, Impliedcuts),
(int, infproofcuts, Infproofcuts),
(int, liftprojectcuts, Liftprojectcuts),
(int, masterknapsackcuts, Masterknapsackcuts),
(int, mipsepcuts, Mipsepcuts),
(int, mircuts, Mircuts),
(int, mixingcuts, Mixingcuts),
(int, modkcuts, Modkcuts),
(int, networkcuts, Networkcuts),
(int, projimpliedcuts, Projimpliedcuts),
(int, psdcuts, Psdcuts),
(int, relaxliftcuts, Relaxliftcuts),
(int, rltcuts, Rltcuts),
(int, strongcgcuts, Strongcgcuts),
(int, submipcuts, Submipcuts),
(int, zerohalfcuts, Zerohalfcuts),
(int, numericfocus, Numericfocus),
(int, tunecleanup, Tunecleanup),
(int, tunecriterion, Tunecriterion),
(int, tunedynamicjobs, Tunedynamicjobs),
(int, tunejobs, Tunejobs),
(int, tunemetric, Tunemetric),
(int, tuneoutput, Tuneoutput),
(int, tuneresults, Tuneresults),
(int, tunetargetmipgap, Tunetargetmipgap),
(dbl, tunetargettime, Tunetargettime),
(int, tunetimelimit, Tunetimelimit),
(int, tunetrials, Tunetrials),
(str, poolgap, Poolgap),
(str, poolgapabs, Poolgapabs),
(int, poolsearchmode, Poolsearchmode),
(int, poolsolutions, Poolsolutions),
(int, multiobjmethod, Multiobjmethod),
(int, multiobjpre, Multiobjpre),
(str, threads, Threads),
(str, workerpassword, Workerpassword),
(str, workerpool, Workerpool),
(dbl, dofuncpieceerror, Dofuncpieceerror),
(dbl, dofuncpiecelength, Dofuncpiecelength),
(int, dofuncpieceratio, Dofuncpieceratio),
(int, dofuncpieces, Dofuncpieces),
(int, feasopt, Feasopt),
(int, feasoptmode, Feasoptmode),
(int, feaspref, Feaspref),
(dbl, feasrelaxbigm, Feasrelaxbigm),
(int, freegamsmodel, Freegamsmodel),
(dbl, funcmaxval, Funcmaxval),
(int, funcnonlinear, Funcnonlinear),
(dbl, funcpieceerror, Funcpieceerror),
(dbl, funcpiecelength, Funcpiecelength),
(int, funcpieceratio, Funcpieceratio),
(int, funcpieces, Funcpieces),
(int, iis, Iis),
(int, iismethod, Iismethod),
(int, kappa, Kappa),
(int, kappaexact, Kappaexact),
(str, miptrace, Miptrace),
(dbl, miptraceincumbent, Miptraceincumbent),
(int, miptracenode, Miptracenode),
(int, miptracetime, Miptracetime),
(int, multobj, Multobj),
(int, names, Names),
(str, objnabstol, Objnabstol),
(str, objnreltol, Objnreltol),
(int, optimalitytarget, Optimalitytarget),
(int, pdhggpu, Pdhggpu),
(int, printoptions, Printoptions),
(int, qextractalg, Qextractalg),
(dbl, qextractdenseswitchfactor, Qextractdenseswitchfactor),
(int, qextractdenseswitchlog, Qextractdenseswitchlog),
(str, readparams, Readparams),
(int, rerun, Rerun),
(str, rngrestart, Rngrestart),
(int, seed, Seed),
(int, sensitivity, Sensitivity),
(int, solutiontarget, Solutiontarget),
(int, trynonlin, Trynonlin),
(str, tuning, Tuning),
(str, usebasis, Usebasis),
(int, varhint, Varhint),
(str, writeparams, Writeparams),
(str, writeprob, Writeprob),
Loading