Giter VIP home page Giter VIP logo

Comments (5)

adrelanos avatar adrelanos commented on May 22, 2024 3

If you like I can send a pull request fixing most or even all of them.

from orjail.

gibix avatar gibix commented on May 22, 2024 1

now we have travis with shellcheck 4fb5395

from orjail.

gibix avatar gibix commented on May 22, 2024 1

closed by dd771e4

from orjail.

adrelanos avatar adrelanos commented on May 22, 2024
In orjail line 8:
REALPATH=`realpath $0`
         ^-- SC2006: Use $(..) instead of legacy `..`.
                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 9:
REALPATH=`dirname $REALPATH`
         ^-- SC2006: Use $(..) instead of legacy `..`.
                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 39:
    if test -n "$NCOLORS" && test $NCOLORS -ge 8; then
                                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 47:
  if [ $2 = 'G' ]; then
       ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 48:
    echo $1 -e "${GREEN}$3${NORMAL}"
         ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 49:
  elif [ $2 = 'Y' ]; then
         ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 50:
    echo $1 -e "${YELLOW}$3${NORMAL}"
         ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 51:
  elif [ $2 = 'N' ]; then
         ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 52:
    echo $1 -e "$3"
         ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 54:
    echo $1 -e "${RED}$3${NORMAL}"
         ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 89:
    rm $TORCONFIGFILE
       ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 91:
    kill -9 $TORPID &> /dev/null
            ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 112:
      iptables -D INPUT -i in-$NAME -p tcp --destination $IPNETNS --dport $HSERVICEPORT -j ACCEPT
                                                                          ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 113:
      iptables -D INPUT -i in-$NAME -p tcp --source $IPNETNS --sport $HSERVICEPORT -j ACCEPT
                                                                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 151:
  print N "    -y, --yes          Answer all questions with "y" (orjail -y pidgin)."
                                                             ^-- SC2140: Word is on the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?


In orjail line 159:
  exit $1
       ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 169:
  REALPATH=`realpath $0`
           ^-- SC2006: Use $(..) instead of legacy `..`.
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 170:
  REALPATH=`dirname $REALPATH`
           ^-- SC2006: Use $(..) instead of legacy `..`.
                    ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 181:
  mount --bind -o users $RESOLVEFILE /etc/resolv.conf || \
                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 187:
    $SUDOBIN -u $USERNAME "$@"
                ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 189:
    su $USERNAME -c "$*"
       ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 280:
      set -- $@ "$SHELL"
             ^-- SC2068: Double quote array expansions to avoid re-splitting elements.


In orjail line 337:
  if ! [ file = "$(type -t $cmd 2>/dev/null)" ]; then
         ^-- SC1009: Use 'if cmd; then ..' to check exit code, or 'if [[ $(cmd) == .. ]]' to check output.
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 345:
ip netns list | grep -e \\b$NAME\\b  &> /dev/null
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 350:
    read CREATE
    ^-- SC2162: read without -r will mangle backslashes.


In orjail line 362:
  ip netns add $NAME || die "Failed to add a new namespace"
               ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 366:
  ip link add in-$NAME type veth peer name out-$NAME || \
                 ^-- SC2086: Double quote to prevent globbing and word splitting.
                                               ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 371:
  ip link set out-$NAME netns $NAME || \
                  ^-- SC2086: Double quote to prevent globbing and word splitting.
                              ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 376:
  ip addr add $IPHOST/$NETMASK dev in-$NAME || \
              ^-- SC2086: Double quote to prevent globbing and word splitting.
                      ^-- SC2086: Double quote to prevent globbing and word splitting.
                                      ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 378:
  ip link set in-$NAME up || die "Failed to set up the veth interface"
                 ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 382:
  ip netns exec $NAME ip addr add $IPNETNS/$NETMASK dev out-$NAME || \
                ^-- SC2086: Double quote to prevent globbing and word splitting.
                                  ^-- SC2086: Double quote to prevent globbing and word splitting.
                                           ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 384:
  ip netns exec $NAME ip link set out-$NAME up || \
                ^-- SC2086: Double quote to prevent globbing and word splitting.
                                      ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 389:
  ip netns exec $NAME ip route add default via $IPHOST || \
                ^-- SC2086: Double quote to prevent globbing and word splitting.
                                               ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 394:
  iptables -t nat -A  PREROUTING -i in-$NAME -p udp -d $IPHOST --dport 53 -j DNAT \
                                       ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 395:
        --to-destination $IPHOST:5354 || \
                         ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 400:
  iptables -t nat -A  PREROUTING -i in-$NAME -p tcp --syn -j DNAT \
                                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 401:
           --to-destination $IPHOST:9040 || \
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 403:
  iptables -A OUTPUT -m state -o in-$NAME --state ESTABLISHED,RELATED -j ACCEPT || \
                                    ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 408:
  iptables -I INPUT -i in-$NAME -p udp --destination $IPHOST --dport 5354 -j ACCEPT &&
                          ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 409:
  iptables -I INPUT -i in-$NAME -p tcp --destination $IPHOST --dport 9040 -j ACCEPT &&
                          ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 411:
    iptables -I INPUT -i in-$NAME -p tcp --source $IPNETNS --sport $HSERVICEPORT -j ACCEPT &&
                            ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                  ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 412:
    iptables -I INPUT -i in-$NAME -p tcp --destination $IPNETNS --dport $HSERVICEPORT -j ACCEPT
                            ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                       ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 413:
  fi &&
     ^-- SC2015: Note that A && B || C is not if-then-else. C may run when A is true.


In orjail line 415:
  iptables -A INPUT -i in-$NAME -j DROP || \
                          ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 426:
  chown $USERNAME $TORCONFIGFILE || \
        ^-- SC2086: Double quote to prevent globbing and word splitting.
                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 429:
  echo "DataDirectory /tmp/orjail-$NAME"        > $TORCONFIGFILE &&
                                                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 430:
  echo "AutomapHostsSuffixes .onion,.exit"      >> $TORCONFIGFILE &&
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 431:
  echo "AutomapHostsOnResolve 1"                >> $TORCONFIGFILE &&
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 432:
  echo "PidFile      /tmp/orjail-$NAME/pid"    >> $TORCONFIGFILE &&
                                                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 433:
  echo "User         $USERNAME"                 >> $TORCONFIGFILE &&
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 437:
      echo "HiddenServiceDir $(realpath $HIDDENSERVICEDIR)"       >> $TORCONFIGFILE
                                        ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 439:
      echo "HiddenServiceDir /tmp/orjail-$NAME"  >> $TORCONFIGFILE
                                                    ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 441:
    echo "HiddenServicePort $HSERVICEPORT $IPNETNS:$HSERVICEPORT" >> $TORCONFIGFILE
                                                                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 446:
     echo "VirtualAddrNetworkIPv4 $IPNETNS/16"  >> $TORCONFIGFILE &&
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 447:
     echo "TransPort $IPHOST:9040"              >> $TORCONFIGFILE &&
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 448:
     echo "DNSPort $IPHOST:5354"                >> $TORCONFIGFILE
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 450:
     echo "VirtualAddrNetwork $IPNETNS/16"      >> $TORCONFIGFILE &&
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 451:
     echo "TransListenAddress $IPHOST"          >> $TORCONFIGFILE &&
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 452:
     echo "TransPort 9040"                      >> $TORCONFIGFILE &&
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 453:
     echo "DNSListenAddress $IPHOST"            >> $TORCONFIGFILE &&
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 454:
     echo "DNSPort 5354"                        >> $TORCONFIGFILE
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 455:
   fi &&
      ^-- SC2015: Note that A && B || C is not if-then-else. C may run when A is true.


In orjail line 457:
  echo "SOCKSPort 0"                            >> $TORCONFIGFILE || \
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 462:
  $TORBIN --quiet -f $TORCONFIGFILE &> /dev/null &
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 470:
echo "nameserver $IPHOST" > $RESOLVEFILE || die "Failed to create $RESOLVEFILE"
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 471:
chmod a+r $RESOLVEFILE || die "Failed to change permissions to $RESOLVEFILE"
          ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 476:
    $SUDOBIN -u $USERNAME $FIREJAILBIN --dns=$IPHOST --netns=$NAME "$@"
                ^-- SC2086: Double quote to prevent globbing and word splitting.
                                             ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                             ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 478:
    su $USERNAME -c "$FIREJAILBIN --dns=$IPHOST --netns=$NAME $*"
       ^-- SC2086: Double quote to prevent globbing and word splitting.


In orjail line 481:
  ip netns exec $NAME \
                ^-- SC2086: Double quote to prevent globbing and word splitting.

from orjail.

gibix avatar gibix commented on May 22, 2024

Interesting! I saw that is also supported in travis, we can use it as simple CI

from orjail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.