Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to built-in bounties #97

Merged
merged 7 commits into from
May 17, 2024
Merged

Conversation

guidanoli
Copy link
Contributor

@guidanoli guidanoli commented May 14, 2024

Closes #72

@guidanoli guidanoli force-pushed the feature/built-in-bounties branch from 55014f5 to e2c9d2b Compare May 14, 2024 14:36
@guidanoli
Copy link
Contributor Author

The first commits merely remove unused fields in the AppBounty struct:

  • InputIndex
  • Started
  • Developer.Address

Then, I made the CodeZipBinary field in the CreateAppBounty struct optional, because bounties now can be sent through inputs or be built-in, and so it doesn't make sense for this field to be required in the input JSON schema. In Golang, I had to make this field a pointer to a string to make it optional.

Then, I added a CodeZipPath field to the CreateAppBounty struct. I also made it optional, because we'd still like users to be able to upload new bounties. It does not make any validation on the path, because if the path is malformed or does not point to a .tar.xz file, then exploits for such a bounty will simply not work, which I think is perfectly acceptable.

Now, we need to edit the Dockefile and copy bounty files to some known location, for example, /bounties/lua-5.4.3-bounty_riscv64.tar.xz. I've also adjusted the front-end, to allow the bounty creator to choose between uploading a bounty file or passing the path of the built-in bounty, through a Tabs component.

image

image

@guidanoli guidanoli marked this pull request as ready for review May 14, 2024 15:00
@guidanoli guidanoli requested a review from a team May 14, 2024 15:01
@guidanoli guidanoli force-pushed the feature/built-in-bounties branch from e2c9d2b to e089a75 Compare May 16, 2024 04:09
Copy link
Contributor

@claudioantonio claudioantonio left a comment

Choose a reason for hiding this comment

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

I left a small suggestion, but LGTM!

@guidanoli guidanoli force-pushed the feature/built-in-bounties branch from e089a75 to 9153097 Compare May 17, 2024 03:17
@guidanoli guidanoli merged commit 8c1d07f into main May 17, 2024
@guidanoli guidanoli deleted the feature/built-in-bounties branch May 17, 2024 03:18
@guidanoli guidanoli changed the title Built-in bounties Add support to built-in bounties May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow embedding bounties into the base image
2 participants