2006 Nov 05 12:04 AM
I want to write a simple source code audit tool, which can find errors. It is very important for me because I write master degree work. Please, help...
Hello Artem
As I said already the code inspector does most of the coding checks you are looking for.
Regards
Uwe
2006 Nov 05 2:33 AM
You need to define the objectives of the tool more clearly. When you say, you want to audit the source code what exactly do you intend to do. Define the functionalities of the tool and then we can give you some ideas as to how go about the same.
Regards,
Ravi
2006 Nov 05 2:40 PM
Ravi, thanks for responding to the call!
The functionality of tool:
- parsing of code;
- checking for unsafe/error programming constructs, such as strcpy() or printf() in C, and/or declaring of objects without usage, etc;
- validating this constructs and generating errors or warnings;
It is very important for me, please help.
I'm waiting for your response...
2006 Nov 05 3:45 PM
When you write a program in ABAP and do a syntax check / generate the program it parses the code.
I would suggest you to look at SE30, Code Inspector (SCI) to see what functionality is already existing so that you can accordingly design your tool. Most of the functions you are asking for already built in SAP.
If you still want to do it
1. You can scan the program code, and figure out what commands you want to give a error / warning for. For this you will have to decide upon a list of commands for which you wnat to throw a error.
Regards,
Ravi
Note : Please mark all the helpful answers
2006 Nov 05 5:34 PM
Hello Artem
As I said already the code inspector does most of the coding checks you are looking for.
Regards
Uwe
2006 Nov 05 9:29 PM
Thanks Uwe
You must also understand that I'm a student, which is looking not for complete comercial solution of other developers such as SCI. But I want to create graduate work at the university - simple auditing tool, which may be checks one or two errors only... I spent a lot of time in reseaching different inspection methodologies and want to apply one of them. Also I understood that source code auditing for ABAP very important because of language fields of usage.
P.S. if you have time, please answer: what kind of error may be checked automatically?
2006 Nov 05 10:28 PM
Hello Artem
Even if the code inspector is a free and integral part of the ABAP workbench I believe you could write an interesting graduate work on this topic.
For example, you could analyze the various ABAP tools and feature to improve the quality of ABAP coding like
- code inspector (SCI)
- Coverage analyzer (SCOV)
- eCATT testing (SECATT)
- ABAP Unit Testing
- Checkpoint Groups & Assertions
However, you could also focus on possible shortcomings of the code inspector. For example, you write a report with as many coding errors (not syntax errors) as possible and see which of them are found by the code inspector and which not. A typical coding error would be a SELECT statment with option FOR ALL ENTRIES IN <itab> without checking if <itab> is not initial.
You could extend this work by finding out if and how the code inspector could be enhanced.
Hope I could give you some more insights.
Regards
Uwe
2006 Nov 05 10:39 PM
you could as well check for performance problems in joins:
Is an existing index used...
What is the restricting sequence in the from clause
What is the restricting sequence in the where clause
What does the DB access tree say...
Enjoy
2006 Dec 11 10:17 PM
I need to define more exactly my question. I need to check any part of source code written on ABAP for <b>security threats</b>. From my investigations I find only one example of such threat - not explicit or absence of usages of authority_check in new developed modules. Please? give me more examples and I try to investigate the direction, which you show.
2006 Dec 12 6:03 AM
Hello Artem
Other examples of security threats are:
(1) Are there hard-coded checks on SY-UNAME,e.g.:
IF ( sy-uname = '<specific user name'> ).
* execute functions others users are not allowed to to
ENDIF.
CHECK ( sy-uname = '<specific user name'> ).
* execute functions others users are not allowed to to(2) Are there hard-coded checks on sy-sysid, e.g.:
IF ( sy-sysid = '<specific SAP system ID'> ).
* execute functions not allowed on others SAP systems
ENDIF.
CHECK ( sy-sysid = '<specific SAP system ID'> ).
* execute functions not allowed on others SAP systemsWhile the threat in case (1) is obvious I would be suspicious if functions are linked to certain SAP systems. However, please note that a smart (evil) developer will easily circumvent checks on such security threats.
Regards
Uwe
2006 Nov 05 7:23 AM
Hello Artem
The <i>code inspector</i> (transaction <b>SCI</b>) is already a quite powerful ABAP coding "audit" tool.
Regards
Uwe
2014 Sep 29 7:56 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |