Skip to content

Commit

Permalink
Merge pull request #297 from CoinFabrik/fix-ci
Browse files Browse the repository at this point in the history
Fix ci
  • Loading branch information
tenuki authored Aug 7, 2024
2 parents 738320b + 5cb53cb commit 4e235ba
Show file tree
Hide file tree
Showing 108 changed files with 190 additions and 241 deletions.
4 changes: 2 additions & 2 deletions docs/docs/detectors/12-soroban-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Using an old version of Soroban can be dangerous, as it may have bugs or securit

```toml
[dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { version = "=21.4.0" }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { version = "=20.0.0", features = ["testutils"] }
```

Expand Down
7 changes: 3 additions & 4 deletions docs/docs/detectors/4-overflow-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Integer overflow will trigger a panic in debug builds or will wrap in
release mode. Division by zero will cause a panic in either mode. In some applications one
wants explicitly checked, wrapping or saturating arithmetic.


### Example

```toml
Expand All @@ -26,7 +25,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = "20.0.0-rc2"

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { version = "=20.0.0", features = ["testutils"] }

[features]
Expand Down Expand Up @@ -62,7 +61,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = "20.0.0-rc2"

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { version = "=20.0.0", features = ["testutils"] }

[features]
Expand All @@ -87,4 +86,4 @@ debug-assertions = true

### Implementation

The detector's implementation can be found at [this link](https://github.com/CoinFabrik/scout-soroban/tree/main/detectors/overflow-check).
The detector's implementation can be found at [this link](https://github.com/CoinFabrik/scout-soroban/tree/main/detectors/overflow-check).
6 changes: 3 additions & 3 deletions docs/docs/vulnerabilities/12-soroban-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Consider the following `Cargo.toml`:
[dependencies]
soroban-sdk = { version = "=19.0.0" }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { version = "=19.0.0", features = ["testutils"] }
```

Expand All @@ -32,7 +32,7 @@ The vulnerable code example can be found [`here`](https://github.com/CoinFabrik/
// Use the latest version available.
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }
```

Expand All @@ -41,4 +41,4 @@ The remediated code example can be found [`here`](https://github.com/CoinFabrik/
## References

- [Floating Pragma](https://swcregistry.io/docs/SWC-103/)
- [outdated Compiler Version](https://swcregistry.io/docs/SWC-102/)
- [outdated Compiler Version](https://swcregistry.io/docs/SWC-102/)
18 changes: 9 additions & 9 deletions templates/test-case/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
[package]
edition = "2021"
name = "incrementor"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { version = "=21.4.0" }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { version = "=20.0.0", features = ["testutils"] }

[features]
testutils = ["soroban-sdk/testutils"]

[profile.release]
opt-level = "z"
overflow-checks = true
codegen-units = 1
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true
opt-level = "z"
overflow-checks = true
panic = "abort"
strip = "symbols"

[profile.release-with-logs]
debug-assertions = true
inherits = "release"
debug-assertions = true
2 changes: 1 addition & 1 deletion test-cases/assert-violation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["assert-violation-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { version = "=21.4.0" }

[profile.release]
codegen-units = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
2 changes: 1 addition & 1 deletion test-cases/avoid-core-mem-forget/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["avoid-core-mem-forget-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { version = "=21.4.0" }

[profile.release]
codegen-units = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
2 changes: 1 addition & 1 deletion test-cases/avoid-panic-error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["avoid-panic-error-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { version = "=21.4.0" }

[profile.release]
codegen-units = 1
Expand Down
2 changes: 1 addition & 1 deletion test-cases/avoid-unsafe-block/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["avoid-unsafe-block-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { version = "=21.4.0" }

[profile.release]
codegen-units = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
2 changes: 1 addition & 1 deletion test-cases/divide-before-multiply/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["divide-before-multiply-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { version = "=21.4.0" }

[profile.release]
codegen-units = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
2 changes: 1 addition & 1 deletion test-cases/dos-unbounded-operation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["dos-unbounded-operation-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { version = "=21.4.0" }

[profile.release]
codegen-units = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
3 changes: 1 addition & 2 deletions test-cases/dos-unexpected-revert-with-vector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["dos-unexpected-revert-with-vector-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { version = "=21.4.0" }

[profile.release]
codegen-units = 1
Expand All @@ -19,4 +19,3 @@ strip = "symbols"
[profile.release-with-logs]
debug-assertions = true
inherits = "release"

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
2 changes: 1 addition & 1 deletion test-cases/insufficiently-random-values/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["insufficiently-random-values-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { version = "=21.4.0" }

[profile.release]
codegen-units = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ crate-type = ["cdylib"]
[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
Expand Down
Loading

0 comments on commit 4e235ba

Please sign in to comment.