Skip to content

cmds/exp/gosh: fuzzing of gosh cmd#2555

Merged
RiSKeD merged 4 commits into
u-root:mainfrom
RiSKeD:gosh-fuzz
Nov 14, 2022
Merged

cmds/exp/gosh: fuzzing of gosh cmd#2555
RiSKeD merged 4 commits into
u-root:mainfrom
RiSKeD:gosh-fuzz

Conversation

@RiSKeD

@RiSKeD RiSKeD commented Nov 10, 2022

Copy link
Copy Markdown
Contributor

This PR implements a fuzzing target for the run Command of the gosh package.
I had to restrict the input space heavily so no inputs are used which might not terminate the shell in time.
Also, this test is mostly fuzzing the underlying interpreter dependency by executing the gosh command, so I had to include checks for multiple panics invoked by the dependency. Don't forget that these panics are deliberate as some inputs are expected to cause these. For example some arithmetic expressions like division by zero.
Signed-off-by: Fabian Wienand fabian.wienand@9elements.com

Signed-off-by: Fabian Wienand <fabian.wienand@9elements.com>
@codecov

codecov Bot commented Nov 10, 2022

Copy link
Copy Markdown

Codecov Report

Base: 73.67% // Head: 73.84% // Increases project coverage by +0.16% 🎉

Coverage data is based on head (b092642) compared to base (94e5d00).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2555      +/-   ##
==========================================
+ Coverage   73.67%   73.84%   +0.16%     
==========================================
  Files         406      406              
  Lines       41282    41282              
==========================================
+ Hits        30416    30485      +69     
+ Misses      10866    10797      -69     
Impacted Files Coverage Δ
pkg/acpi/rsdp.go 51.28% <0.00%> (+10.25%) ⬆️
pkg/acpi/raw.go 89.28% <0.00%> (+14.28%) ⬆️
pkg/acpi/bios.go 83.78% <0.00%> (+83.78%) ⬆️
pkg/acpi/sdt.go 86.66% <0.00%> (+86.66%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rminnich rminnich added the Awaiting author Waiting for new changes or feedback for author. label Nov 11, 2022
@RiSKeD RiSKeD requested review from MDr164 and rminnich November 12, 2022 16:18
Comment thread cmds/exp/gosh/gosh_test.go Outdated
@RiSKeD RiSKeD merged commit a51ebc2 into u-root:main Nov 14, 2022
This was referenced Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting author Waiting for new changes or feedback for author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants