Bug 317101 - Review Request: rats - Rough Auditing Tool for Security
Summary: Review Request: rats - Rough Auditing Tool for Security
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-03 17:01 UTC by Scott J Henson
Modified: 2014-07-03 11:53 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-29 16:36:35 UTC
Type: ---
Embargoed:
lkundrak: fedora-review+


Attachments (Terms of Use)

Description Scott J Henson 2007-10-03 17:01:41 UTC
Spec URL: http://sjhserv.net/~sjh/rats.spec
SRPM URL: http://sjhserv.net/~sjh/rats-2.1-1.fc8.src.rpm
Description: 
RATS scans through code, finding potentially dangerous function calls.
The goal of this tool is not to definitively find bugs (yet). The 
current goal is to provide a reasonable starting point for performing 
manual security audits.

The initial vulnerability database is taken directly from things that
could be easily found when starting with the forthcoming book, 
"Building Secure Software" by Viega and McGraw.  

RATS is released under version 2 of the GNU Public License (GPL).

Comment 1 Lubomir Kundrak 2007-10-03 17:10:59 UTC
Taking this for review.

Comment 2 Lubomir Kundrak 2007-10-08 13:31:40 UTC
Scott: thanks for the package, it looks very well. Here are some random things
that would be nice to be looked at before this this gets approval:

 25 RATS is released under version 2 of the GNU Public License (GPL).

This is not necessary, License: tag is for this.

 30 ./configure  --prefix=/usr \
 31             --datadir=%{_datadir}/rats
 32 
 33 %build
 34 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS

Why not use the %configure macro? It would set the CFLAGS for you, and possibly
correct libdir on 64 bit architectures, etc.

 38 %install
 39 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

Do not conditionally remove the build root. Just delete it, it is never root.

 45 # rm -rf $RPM_BUILD_ROOT
 46 # mkdir -p $RPM_BUILD_ROOT/usr
 47 # make install prefix=$RPM_BUILD_ROOT
 48 # mv bin share $RPM_BUILD_ROOT/usr/

Why is this commented? Why do you install stuff by hand instead of make install?
It does not have to be wrong, just please always write comments in SPEC in case
you do something nonstandard.

 53 #make clean

Also, never make useless comments like this. Just remove it. Also applies to
what is below the %files section.

 77 * Wed Sep 26 2007 Scott Henson <shenson>
 78  - 2.1-1: Initial packaged version

The correct format of the changelog entry would be:

 77 * Wed Sep 26 2007 Scott Henson <shenson> - 2.1-1
 78 - Initial packaged version

Comment 3 Lubomir Kundrak 2007-10-08 13:36:09 UTC
RPMLint:

> $ rpmlint /home/lkundrak/rpmbuild/SRPMS/rats-2.1-1.fc8.src.rpm
> rats.src:32: E: configure-without-libdir-spec

Just do a
$ expand rats.spec >x; mv x rats.spec

> rats.src: W: mixed-use-of-spaces-and-tabs (spaces: line 1, tab: line 11)

This would be solved using the %configure macro, as I wrote in comment #2

> $ rpmlint /home/lkundrak/rpmbuild/RPMS/i386/rats-2.1-1.fc8.i386.rpm
> $ rpmlint /home/lkundrak/rpmbuild/RPMS/i386/rats-debuginfo-2.1-1.fc8.i386.rpm
> $ 

Fine

Comment 4 Lubomir Kundrak 2007-10-08 13:49:57 UTC
I can not compare the upstream version with the packaged at the time as the
upstream web is not responding at the time.

The patch rats-2.1-linux.diff doesn't seem right to me;
1.) files rats-2.1/lex.yy*.c are autogenerated. Why don't you regenerate them
instead of patching?
2.) You seem to be patching unrelated issues in this one patch. Please eplit it
into multiple patches.

When I was talking about libdir in comment #2 and comment #3, I did not notice
that the package doesn't make use of libdir. Please ingore it.

Another bad thing in .SPEC:

  8 URL:            http://www.securesw.com/rats/rats-%{version}.tar.gz
  9 Source0:        rats-2.1.tar.gz

The URL tag is for the web page of the software's author, Source0 is for URIs of
the files. It should look like this instead:

  8 URL:            http://www.securesw.com/rats/
  9 Source0:        http://www.securesw.com/rats/rats-%{version}.tar.gz

Apart from these issues, the package meets the Packing Guidelines, and I will
approve it when the issues are resolved.

Comment 5 Lubomir Kundrak 2007-10-08 14:30:50 UTC
Builds fine in mock for fedora-devel-i386

Comment 6 Scott J Henson 2007-10-08 19:15:28 UTC
Sorry I haven't responded, I didn't see the update.  

As for the upstream, securesw was bought out by fortify.  I was contacting them
with the Debian maintainer while I put the package together so that never got
updated.  The next version will have the corrected URL.

I will take care of the other problems now as well.  Thank you.

Comment 7 Scott J Henson 2007-10-08 19:33:55 UTC
A new verion is now avaliable at http://sjhserv.net/~sjh/Rats/.  I believe all
the above problems should be fixed.  Thank you.

Comment 8 Lubomir Kundrak 2007-10-09 09:47:43 UTC
Just a note, so this doesn't look stalled; we discussed the patch split on IRC
and are waiting for a response from Debian patch maintainer. Also, Scott:
Mentioning that the patch comes from Debian should be appropriate in patch's header.

Comment 9 Scott J Henson 2007-10-09 19:31:45 UTC
New version avaliable.
SRPM: http://sjhserv.net/~sjh/Rats/rats-2.1-3.fc8.src.rpm
SPEC: http://sjhserv.net/~sjh/Rats/rats.spec

* Tue Oct 9 2007 Scott Henson <shenson> - 2.1-3
 - Break the monolithic patch into pieces
 - Build Clean, contains build cleanups and spelling corrections
 - Php, adds support for php3 and php4 files
 - Report, adds some html output cleanup
 - Lex, some lex bug fixes
 - GTK-Vuln, adds some gtk vulnerabilities
 - Also generate lex output files on each build.

As for the Debian maintainer, the lex-yy*.c stuff just slipped in as a result of
the Debian build process.  I missed him calling make lex in the debian/rules
file.  I now call this in the spec, so its now building the lex files every time.  

Comment 10 Scott J Henson 2007-10-09 19:53:12 UTC
The latest version doesn't work because the configure macro sets datadir to
/usr/share and rats wants it at /usr/share/rats.  I can do a configure myself,
but then I get the following error.

rats.src:40: E: configure-without-libdir-spec

It appears above as well and I think you said I could ignore that since rats
doesn't use lib.  Is that right? Or shold I do something to take care of this? 
If I can just ignore it, new version:

SRPM: http://sjhserv.net/~sjh/Rats/rats-2.1-3.fc8.src.rpm
SPEC: http://sjhserv.net/~sjh/Rats/rats.spec

Comment 11 Scott J Henson 2007-10-10 01:46:12 UTC
New version with fixes for what was discussed in irc.

SRPM: http://sjhserv.net/~sjh/Rats/rats-2.1-5.fc8.src.rpm
SPEC: http://sjhserv.net/~sjh/Rats/rats.spec

* Tue Oct 9 2007 Scott Henson <shenson> - 2.1-5
 - Change the Makefile.in so we can use the configure macro
 - Rename all patches to .patch to be more standard


Comment 12 Lubomir Kundrak 2007-10-10 07:17:04 UTC
Tadaa, the package is beuatiful; ready to go to CVS.

APPROVED

Comment 13 Scott J Henson 2007-10-11 20:06:42 UTC
New Package CVS Request
=======================
Package Name: rats
Short Description: Rough Auditing Tool for Security
Owners: shenson
Branches: F-7
InitialCC: 
Cvsextras Commits: no

Comment 14 Kevin Fenzi 2007-10-12 17:44:25 UTC
cvs done

Comment 15 Christopher Meng 2014-07-03 06:47:27 UTC
Package Change Request
======================
Package Name: rats
New Branches: f20
Owners: cicku

Comment 16 Gwyn Ciesla 2014-07-03 11:51:41 UTC
Branch exists, ownership is handled in pkgdb.


Note You need to log in before you can comment on or make changes to this bug.