security

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mattia Adami

    #1

    security

    Hi to all.
    I'm intristing in write a plugin for browsers that can execute python
    code.
    I know the main problem is security. Many thread were opened about this
    in the ng.
    I would know if fork python rewriting some library could avoid
    problems. I.e. one problem is the possibility to access files. If I
    rewrite the open() function so that raises exception if the program try
    to access a file out of a defined directory.
    I'm sure not a security expert, so please be patient if my question is
    stupid.
    Thanks to all.

  • Bruno Desthuilliers

    #2
    Re: security

    Mattia Adami a écrit :[color=blue]
    > Hi to all.
    > I'm intristing in write a plugin for browsers that can execute python
    > code.
    > I know the main problem is security. Many thread were opened about this
    > in the ng.
    > I would know if fork python rewriting some library could avoid
    > problems. I.e. one problem is the possibility to access files. If I
    > rewrite the open() function so that raises exception if the program try
    > to access a file out of a defined directory.
    > I'm sure not a security expert, so please be patient if my question is
    > stupid.
    > Thanks to all.[/color]

    I'm not a security expert either, but you may want to have a look at the
    way Zope 2.x handles this kind of restrictions for TTW scripts.

    Comment

    • Mike Meyer

      #3
      Re: security

      "Mattia Adami" <am_public@emai l.it> writes:
      [color=blue]
      > Hi to all.
      > I'm intristing in write a plugin for browsers that can execute python
      > code.
      > I know the main problem is security. Many thread were opened about this
      > in the ng.
      > I would know if fork python rewriting some library could avoid
      > problems. I.e. one problem is the possibility to access files. If I
      > rewrite the open() function so that raises exception if the program try
      > to access a file out of a defined directory.
      > I'm sure not a security expert, so please be patient if my question is
      > stupid.[/color]

      People who *are* security experts have looked into modifying Python to
      make it secure, and given up on the project as unrealistic. Generally,
      taking an existing project that wasn't designed with security in mind
      and making it secure is hard. Not impossible, but not easy.

      You might consider using Jython and jythonc to produce objects to run
      in the JVM. Not only was that designed with security in mind, but most
      browsers come with a JVM already installed.

      <mike
      --
      Mike Meyer <mwm@mired.or g> http://www.mired.org/home/mwm/
      Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

      Comment

      Working...