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

BitCCL Integration #165

Open
1 of 5 tasks
Tracked by #243
MrNaif2018 opened this issue Jan 23, 2021 · 2 comments
Open
1 of 5 tasks
Tracked by #243

BitCCL Integration #165

MrNaif2018 opened this issue Jan 23, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@MrNaif2018
Copy link
Member

MrNaif2018 commented Jan 23, 2021

This issue contains a list of improvements in the BitCCL area (integrating it):

  • Fix security issues with imports still being allowed, for example:
    template.__globals__['os'].listdir('/')
  • Start integration process with the Merchants API: extend plugins functionality or move the state from state module to state object or other way that is easier to modify
  • Think of execution policies: store-wide and server-wide, to configure/limit scripts options
  • Integrate into the Merchants API
  • Custom scripts execution policies

Note: BitCCL might be implemented as a plugin (see #242)

@MrNaif2018 MrNaif2018 added the enhancement New feature or request label Jan 23, 2021
@MrNaif2018 MrNaif2018 added this to Q1 2021-Jan-Mar in BitcartCC Roadmap 2022 Jan 23, 2021
@MrNaif2018 MrNaif2018 moved this from Q1 2021-Jan-Mar to Q2 2021 – Apr-Jun in BitcartCC Roadmap 2022 Apr 7, 2021
@MrNaif2018
Copy link
Member Author

From the further investigation, I think it is not possible to limit BitCCL execution fully, for example:

print((1).__class__.__base__.__subclasses__())

Executed in BitCCL environment, will return a list of all classes ever defined, providing access to all dangerous functions and modules because they are partially used in helper functions.

We have two approaches: either we can use RestrictedPython or we just not limit the merchants at all.

Because, re-thinking it, actually we still provide some helper functions for editing the database, so an attacker could just write the code which gets all wallets xpubs and sends it to remote server, we can't limit this as this is a valid use case for some merchants, but a privacy issue for others. That means that maybe that restriction is not necessary and possible anyway, and merchants just must validate the scripts they get from untrusted sources

@MrNaif2018
Copy link
Member Author

MrNaif2018 commented Jun 11, 2021

We have decided to use RestrictedPython
Implementation PR: bitcart/bitccl#11
https://github.com/bitcartcc/bitccl/blob/master/README.md#how-does-bitccl-secure-the-users

@MrNaif2018 MrNaif2018 moved this from Q2 2021 – Apr-Jun to Q4 2021 – Oct-Dec in BitcartCC Roadmap 2022 Sep 27, 2021
@MrNaif2018 MrNaif2018 mentioned this issue Oct 1, 2021
24 tasks
@MrNaif2018 MrNaif2018 moved this from Q4 2021 – Oct-Dec to Q2 2021 – Apr-Jun in BitcartCC Roadmap 2022 Jan 16, 2022
@MrNaif2018 MrNaif2018 moved this from Q2 2022 – Apr-Jun to To be re-created in BitcartCC Roadmap 2022 Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
BitcartCC Roadmap 2022
To be re-created
Development

No branches or pull requests

1 participant