Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

I'm facing a similar problem with my crackpot idea of Alien:: modules, which is why I haven't released them onto CPAN.

My modules (Alien::JavaScript::SpiderMonkey and Alien::MP3::ID3Lib) download and build other Perl modules that rely on third party libraries, like id3lib, the SpiderMonkey javascript engine or other stuff, and since the installation is intended to be completely automatic, they download the libraries and execute code to build them, all from the web. This makes these modules completely unsuitable for an unprotected upload to CPAN, as all CPAN testers will then unknowingly download code from the web that is not on the CPAN - a bad situation indeed.

I haven't found a good way to detect whether my Alien Makefile.PL is run by a CPAN tester instead of a real installation, so I can't skip/fail the download for them - any suggestions are welcome.

For the general solution to prevent CPAN-spawned processes from accessing the web, maybe setting $ENV{HTTP_PROXY} to a local proxy program written with HTTP::Proxy would be a good filter - that proxy should then only allow access to your list of CPAN mirrors, as configured in CPAN::Config.

Of course, a malicious script can still reset $ENV{HTTP_PROXY} and try to access the network directly, and I'm not sure whether it's possible to restrict network access for a single (unix) user to localhost, or better, 127.0.0.2.

Still, even with these precautions, the make install step has the possibility of wrecking havoc to your existing Perl installation, and even if your Perl installation is not your system Perl installation, it's not really safe to blindly install modules from CPAN.


In reply to Re: Blatant security problem in certain CPAN module installs by Corion
in thread Blatant security problem in certain CPAN module installs by toma

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others browsing the Monastery: (9)
    As of 2014-12-26 18:03 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (174 votes), past polls