Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Runbot skip test jobs #51

Merged
merged 3 commits into from
Aug 28, 2015
Merged

Runbot skip test jobs #51

merged 3 commits into from
Aug 28, 2015

Conversation

lepistone
Copy link
Member

To avoid conflicts I included #49 here. The diff will look correct here once #49 is merged. Thanks!

@pedrobaeza
Copy link
Member

Please rebase to let only relevant commits

@pedrobaeza
Copy link
Member

Anyways seeing the 2 commits, 👍

@max3903
Copy link
Member

max3903 commented Aug 19, 2015

👍

@nhomar
Copy link
Member

nhomar commented Aug 19, 2015

@lepistone We triued this development, but pass as parameters this information, how ensure you are not opening all the server to the user interface?

I do not see any virtualenv (may be I miss something) or ny container....

For example if it allows me pass paramenters I can pass --stop-after-init | rm -rf ~/ and delete all the home for runbot user making this a huge security flag don't you think?

Did you verify that, may be my code per review was not deep enought... regards.

@bwrsandman
Copy link

It's a known security issue and it exists even in odoo runbot. Anyone who changes the executable in a pull request can run whatever command they want.
My proposed solution for this #38

@nhomar
Copy link
Member

nhomar commented Aug 20, 2015

That's true but this open a second security hole didn't it?

Your comment is regarding to "what a PR can make" I understand and I agree, but this is (my question) what a command setted can do.

They are security hole because the same reason but different ones, and we are introducing such error.

@guewen
Copy link
Member

guewen commented Aug 20, 2015

@nhomar You are right, it is a risk if anyone can access to the configuration of the builds, still this is not a problem in some use cases (if only you have access to the configuration / runbot instance is not shared).
It seems that #38 would correct the 2 problems.
The commit your are talking about is already merged in 8.0, this PR is about the "skip test" (and needs a rebase that's why we see the other commits). So what do you want to do about that? Should we add a disclaimer in the manifest of the module?

@lepistone lepistone force-pushed the runbot-skip-test-jobs branch from 6117b37 to 25aefc2 Compare August 20, 2015 07:50
@bwrsandman
Copy link

@nhomar anyone who can add harmful code to the build instructions needs to be either admin or part of the runbot group.

On top of that, adding bash expressions || for example will not work since the mechanism here is python system and those work with single commands. Python itself does the piping and the logical operations on return codes, but this is not part of the build_instructions mechanism.

That's not to say the executable couldn't be changed to something harmful, but that is the same issue as with the vanilla runbot. The vanilla runbot security issue is more serious because anyone who can do a pull request can change the code that is run, while build_instructions one would be limited with those who have been granted the rights.

I see them as the same security issue since they're both affected by the more serious issue or the pullrequester being able to change the code that is run. Therefore there needs to be sandboxing such as dockerization.

def job_10_test_base(self, cr, uid, build, lock_path, log_path):
if build.branch_id.repo_id.skip_test_jobs:
_logger.info('skipping job_10_test_base')
return -2

Choose a reason for hiding this comment

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

Can you explain this magic number?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Please put a note explaining that this is the expected number in runbot for directly calling next job

Choose a reason for hiding this comment

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

Even better: factor it as a global variable, that way it's self documenting and if it changes in the future, it can be fixed at one place.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@lepistone
Copy link
Member Author

As discussed, I don't think we're making the vulnerability worse. While anyone can make a public pull request, only an administrator can change the runbot settings. I think this PR can go forward independently of #38.

Thanks!

@bwrsandman
Copy link

@lepistone Agreed

@nhomar
Copy link
Member

nhomar commented Aug 20, 2015

A disclaimer in the module is enough at least until we find and or develop
a proper and more secure way.

On Thursday, August 20, 2015, Guewen Baconnier notifications@github.com
wrote:

@nhomar https://github.com/nhomar You are right, it is a risk if anyone
can access to the configuration of the builds, still this is not a problem
in some use cases (if only you have access to the configuration / runbot
instance is not shared).
It seems that #38 #38 would
correct the 2 problems.
The commit your are talking about is already merged in 8.0, this PR is
about the "skip test" (and needs a rebase that's why we see the other
commits). So what do you want to do about that? Should we add a disclaimer
in the manifest of the module?


Reply to this email directly or view it on GitHub
#51 (comment).


Saludos Cordiales

CEO at Vauxoo https://www.vauxoo.com Odoo's Gold Partner.

[image: --]
Nhomar Hernandez
[image: http://]about.me/nhomar
http://about.me/nhomar?promo=email_sig

@bwrsandman
Copy link

That could be added to the module's description, but I would respectfully ask you to do this in another pull request. This one is on the affected module, but the changeset not related and we shouldn't be tagging on feature requests until we end up patchbombing.

@nhomar
Copy link
Member

nhomar commented Aug 20, 2015

2015-08-20 10:46 GMT-05:00 Sandy notifications@github.com:

That could be added to the module's description, but I would respectfully
ask you to do this in another pull request. This one is on the affected
module, but the changeset not related and we shouldn't be tagging on
feature requests until we end up patchbombing.

Agreed also.


Saludos Cordiales

CEO at Vauxoo https://www.vauxoo.com Odoo's Gold Partner.

[image: --]
Nhomar Hernandez
[image: http://]about.me/nhomar
http://about.me/nhomar?promo=email_sig

@moylop260
Copy link
Contributor

👍

@guewen
Copy link
Member

guewen commented Aug 28, 2015

The fail is due to odoo/odoo-extra#60
See also #54 (comment)

@guewen
Copy link
Member

guewen commented Aug 28, 2015

👍

guewen added a commit that referenced this pull request Aug 28, 2015
@guewen guewen merged commit 392fe48 into OCA:8.0 Aug 28, 2015
jjscarafia pushed a commit to adhoc-dev/oca-runbot-addons that referenced this pull request Oct 12, 2016
…escobarvx

[FIX] runbot_send_email: Changed 'if' blocks to fix wrong save template
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants