Audit scope: whole-repo, commit 7aa85a4
Dimension 3 (documentation) · severity medium
Where
- published
rain-sol-codegen~0.1.11
README.md:23-29 (the Install section)
Problem
The 0.1.11 zip has 18 entries: no foundry.toml, no soldeer.lock, no
remappings.txt. All three libraries hard-import forge-std by an exact,
version-pinned prefix — src/lib/LibCodeGen.sol:5, src/lib/LibFs.sol:5 and
src/lib/LibHexString.sol:5 are each:
import {Vm} from "forge-std-1.16.1/src/Vm.sol";
So a consumer following the README's Install section gets a package that cannot
compile the moment they import anything from it, and the README never names
forge-std, its version, or the prefix. The Install section is two lines of
forge soldeer install rain-sol-codegen~<version> and nothing else — no
prerequisite is stated anywhere in the file.
Evidence measured
- published
0.1.11 zip: 18 entries, none of which is foundry.toml,
soldeer.lock or remappings.txt.
- 3 of 3
src/lib/*.sol files import the literal prefix
forge-std-1.16.1/src/Vm.sol; there is no remapping shipped that could
redirect it.
- sibling package
rain-math-float~0.1.7 also ships no foundry.toml.
Proposed fix
A sibling (rain-math-float~0.1.7) ships no foundry.toml either, so that is
org convention and the package is not where this gets fixed. The README is:
state the forge-std version and import prefix the package requires, as an
install prerequisite.
Related
#76 — the published
package is never compiled as published. A CI job that builds the filtered tree
would also be the thing that keeps this README prerequisite honest, since it has
to supply forge-std to build at all.
Audit scope: whole-repo, commit 7aa85a4
Dimension 3 (documentation) · severity medium
Where
rain-sol-codegen~0.1.11README.md:23-29(the Install section)Problem
The
0.1.11zip has 18 entries: nofoundry.toml, nosoldeer.lock, noremappings.txt. All three libraries hard-import forge-std by an exact,version-pinned prefix —
src/lib/LibCodeGen.sol:5,src/lib/LibFs.sol:5andsrc/lib/LibHexString.sol:5are each:So a consumer following the README's Install section gets a package that cannot
compile the moment they import anything from it, and the README never names
forge-std, its version, or the prefix. The Install section is two lines of
forge soldeer install rain-sol-codegen~<version>and nothing else — noprerequisite is stated anywhere in the file.
Evidence measured
0.1.11zip: 18 entries, none of which isfoundry.toml,soldeer.lockorremappings.txt.src/lib/*.solfiles import the literal prefixforge-std-1.16.1/src/Vm.sol; there is no remapping shipped that couldredirect it.
rain-math-float~0.1.7also ships nofoundry.toml.Proposed fix
A sibling (
rain-math-float~0.1.7) ships nofoundry.tomleither, so that isorg convention and the package is not where this gets fixed. The README is:
state the forge-std version and import prefix the package requires, as an
install prerequisite.
Related
#76 — the published
package is never compiled as published. A CI job that builds the filtered tree
would also be the thing that keeps this README prerequisite honest, since it has
to supply forge-std to build at all.