smitebot: Add smitebot build command#104
Conversation
smitebot build command
|
ping @NishantBansal2003 |
smitebot build commandsmitebot build command
NishantBansal2003
left a comment
There was a problem hiding this comment.
Great work! Some commands I tested are:
-
smitebot build --target lnd --scenario ir -
smitebot build --target ldk --scenario noise --coverage --smite-dir ./smite -
Using cache:
smitebot build --target ldk --scenario noise --coverage -
Without cache:
smitebot build --target ldk --scenario noise --coverage --no-cache -
smitebot build --target cln --scenario encrypted_bytes --image cln-smitebot
Things I wanted to discuss are:
- In
doctor.rswe useprintln!because the output is intended to be final and, in the JSON case, machine-parsable. However,smitebot buildis not in the same situation, so I think we should use logging instead ofprintln!andeprintln!. Using logs would also give us timestamps, which can be useful later for debugging. WDYT? - For
target, we already define the set of valid values, and those are also shown insmitebot help build. Forscenario, however, we only accept a raw string. Would it make sense to define a fixed set of valid scenario values as well? The drawback is that every time a new scenario is added,smitebotwould also need to be updated
Yes, I agree on logging for
tbh I’d prefer keeping it as a raw string for now. Targets are a fixed workload set, but scenarios are more likely to evolve in future, including IR/custom scenarios. Since the Dockerfiles already consume |
1c8c096 to
1875639
Compare
Adds
smitebot buildto build Smite workload Docker images without starting a fuzzing campaign.The command selects the correct workload Dockerfile from
--target, passesSCENARIOas the build arg, and tags images using the existingsmite-<target>-<scenario>convention. It also supports coverage images, custom tags, and--no-cachefor debugging rebuilds.Validation: