Statische Code-Analyse ROLAND GRAF SIMON KRANZER.

Slides:



Advertisements
Ähnliche Präsentationen
SQL Server 2005.NET Integration Sebastian Weber Developer Evangelist Microsoft Deutschland GmbH.
Advertisements

Web-Entwicklung mit ASP.NET 2.0 und Visual Studio 2005 Uwe Baumann Marketing Manager Developer Tools Microsoft Deutschland GmbH Oliver Scheer Developer.
Web Matrix Project Kurzüberblick Dirk Primbs Technologieberater Developer Platform Strategy Group Microsoft Deutschland GmbH.
Kapitel 4: Schule In this chapter you will: Talk about school
Installation des Add-In SOLVERSTAT
Projektplan: Fachgebiet Software Engineering Übersicht © Albert Zündorf, Kassel University.
Abkürzungen mit Präpositionen German Prepositional Contractions
Michael Haverbeck System Engineer
Don`t make me think! A Common Sense Approach to Web Usability
Clustered Neuronal Network A C#.NET project for Compute Cluster Server 2003.
Clustered Neuronal Network A C#.NET project for Compute Cluster Server 2003.
The Project is partly funded by the European Commission eTEN Programme euromuse.net training for use of Harmonise euromuse.net Das Harmonise-Interface.
| DC-IAP/SVC3 | © Bosch Rexroth Pneumatics GmbH This document, as well as the data, specifications and other information set forth in.
SQL Server 2005 CLR-Integration
Neno Loje Berater & MVP für Visual Studio ALM und TFS (ehemals VSTS) Hochqualitative Produkte mit Visual Studio & TFS 2010.
Frank Fischer + Bernhard Frank Microsoft Deutschland GmbH.
SQL Azure Administration
Windows Presentation Foundation WS 2013/14 Prof. Dr. Herrad Schmidt
Entwicklung verteilter Anwendungen I, WS 13/14 Prof. Dr. Herrad Schmidt WS 13/14 Kapitel 1 Folie 2 Microsoft.NET Framework: Quelle:
Dynamische Datentypen
CALPER Publications From Handouts to Pedagogical Materials.
Ein Projekt des Technischen Jugendfreizeit- und Bildungsvereins (tjfbv) e.V. kommunizieren.de Blended Learning for people with disabilities.
Clean Code Software-Entwicklung als Handwerkskunst Thomas Nagel, November 2011.
Neuerungen in Java 5/6/7. Stefan Bühler für InfoPoint Überblick Java 5 neue Sprachfeatures Erweiterungen Klassenbibliothek Java 6 Erweiterungen.
Universität StuttgartInstitut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie Copulas (1) András Bárdossy IWS Universität Stuttgart.
Technische Universität München 1 CADUI' June FUNDP Namur G B I The FUSE-System: an Integrated User Interface Design Environment Frank Lonczewski.
Parallelisierung für Multiprozessor-Maschinen
Seitenkraft Basis: Achslast der gelenkten bzw starrdeichselanhänger-Achse(n), A v Lenkrollradius r (bei Achsschenkellenkung) bzw Spurweite, 2 r wirksame.
Software Architektur für on-premise und die Cloud Lösungen
Sprachneuerungen des .NET Frameworks 3.5
Institut für Angewandte Mikroelektronik und Datentechnik Course and contest Results of Phase Selected Topics in VLSI Design (Module 24513) ©
BasisPlusWorkshop Codequality CODEANALYSE UND PROFILING – DEVELOPING AND ENSURING CODINGGUIDLINES ROLAND GRAF SIMON KRANZER.
Einfaches Erstellen von Präsentationen aus Einzelfolien heraus.
Revision: 2.40 SLS500-Configurator R0412 Programmumgebung, Programming Environment HIQUEL GmbH Bairisch Kölldorf 266, A-8344 Bad Gleichenberg, Austria.
1 Bauhaus-Universität Weimar ArchitekturProgrammierung Generative Entwurfsmethoden Processing Grundlagen Professur Informatik in der Architektur.
Ralf M. Schnell Technical Evangelist Microsoft Deutschland GmbH
Christian Binder Senior Platform Strategy Manager Microsoft Deutschland GmbH.
Ralf M. Schnell Technical Evangelist Microsoft Deutschland GmbH.
Literary Machines, zusammengestellt für ::COLLABOR:: von H. Mittendorfer Literary MACHINES 1980 bis 1987, by Theodor Holm NELSON ISBN
Arbeiten in einem agilen Team mit VS & TFS 11
Welcome to Web Services & Grid Computing Jens Mache
3rd Review, Vienna, 16th of April 1999 SIT-MOON ESPRIT Project Nr Siemens AG Österreich Robotiker Technische Universität Wien Politecnico di Milano.
Words which are similar in German and English - which syllable is stressed? Presented by Margaret Southgate L193 Rundblick: beginners’ German.
1 Konica Minolta IT Solutions Prinzip Partnerschaft MANAGED MONITORING ÜBERWACHJUNG DER SERVERINFRASTRUKTUR UND ANWENDUNGEN DIREKT AUS DER CLOUD.
Unterwegs.
KLIMA SUCHT SCHUTZ EINE KAMPAGNE GEFÖRDERT VOM BUNDESUMWELTMINISTERIUM Co2 online.
Montag den 8. Juni Lernziel:- To launch a project and receive results.
Gregor Graf Oracle Portal (Part of the Oracle Application Server 9i) Gregor Graf (2001,2002)
Berliner Elektronenspeicherring-Gesellschaft für Synchrotronstrahlung m.b.H., Albert-Einstein-Straße 15, Berlin frontend control at BESSY R. Fleischhauer.
Phonics Lessons Grade 1 Adapted from: Phonics Lessons by Gay Su Pinnell & Irene C. Fountas Grade 1, page 431 caatt If you knowIt helps you know.
10.3 Lektion 10 Geschichte und Gesellschaft STRUKTUREN © and ® 2012 Vista Higher Learning, Inc Der Konjunktiv I and indirect speech —Ich komme.
Sven Koerber-Abe, 2015 Grammatik: können, wollen, möchten Grammatik: können, wollen, möchten.
Großvater Großmutter Großvater Großmutter Tante/Onkel Vater Mutter.
Sven Koerber-Abe, 2015 Grammatik: müssen, dürfen Grammatik: müssen, dürfen.
1Crypto AG / P_M_HC-2650-Course-Notes-d_0833_rd.PPT Training and Education HC-2650 Kursunterlagen.
Sven Koerber-Abe, 2016 Grammatik: Artikel (Zusammenfassung) Grammatik: Artikel (Zusammenfassung)
LLP DE-COMENIUS-CMP Dieses Projekt wurde mit Unterstützung der Europäischen Kommission finanziert. Die Verantwortung für den Inhalt dieser.
LINUX II Unit 9 Network File Server NFS. NFS Überblick ● Zugriff von lokalen Rechner über Netzwerk auf Dateien oder Ordnern auf entfernten Servern ● Entwickelt.
Workshop 1 Getting Started 2016 Boris Wylutzki
Aspect-Oriented Programming: Fad or the Future
Grammatik: waren / hatten
Ferrite Material Modeling (1) : Kicker principle
Official Statistics Web Cartography in Germany − Regional Statistics, Federal and European Elections, Future Activities − Joint Working Party meeting.
The Conversational Past
The Conversational Past
Practical Exercises and Theory
Ich - Projekt Due Monday, September 19..
School supplies.
- moodle – a internet based learning platform
Grammatik: Position Sven Koerber-Abe, 2013.
 Präsentation transkript:

Statische Code-Analyse ROLAND GRAF SIMON KRANZER

Begriffsklärung  Code-Analyse  Methoden und Techniken die a posteriori sicherstellen dass ein Software-System den geforderten Qualitätsanforderungen genügt.  Statische Code-Analyse  Die oben genannten Techniken bzw. Methoden sind von statischer Natur. Die Überprüfung erfolgt durch Sichtung der Quelltexte (bzw. des Intermediatecodes), ohne diese in ein ausführbares Programmzu übersetzen!

Statische Code-Analyse  Im Rahmen der Softwaretestverfahren ist die Statische Code- Analyse den White-Box-Test-Verfahren zuzuordnen (man benötigt den Quellcode). Die Analyse kann durch manuelle Inspektion erfolgen, aber auch automatisch durch ein Programm. Man spricht dann von statischer Analyse, da die zu testende Software in Form von Algorithmen und Daten in ihrer Formulierung und Beschaffenheit (statisch) dem Prüfer (oder Werkzeug) vorliegt. (WIKIPEDIA)  Vorläufer der statischen Analyse sind die Prüfverfahren der normierten Programmierung und die Werkzeuge zur Erkennung von Code-Mustern, die sogenannten Style Checker. Dynamische Code- Analyse setzt im Gegensatz zur statischen Analyse ein laufendes Programm voraus. Ein dynamisches Pendant zur statischen Code- Analyse zur Compilezeit ist z. B. das Profiling zur Laufzeit. (WIKIPEDIA)

Was nun?  Diskussion  Was unterscheidet statische, regelbasierte Code-Analyse von Design Guidlines und Werkzeugen zum Test auf deren Einhaltung von Tool zur statischen Code-Analyse?

Was kann statische Code-Analyse leisten?  Race Conditions  Pufferüberläufe  Speicherlecks  Formatguidlines Aufgrund einer nach wie vor nicht unerheblichen Anzahl an falsch erkannten, nur vermeintlichen Schwächen im Quellcode ist eine vollautomatische Korrektur durch die Werkzeuge zur statischen Code- Analyse bis zum heutigen Tag nicht Usus. Es werden Warnings generiert und vom/von Tester*in bzw. Entwickler*in beurteilt und ggf. behandelt.

Walkthrough  Code-Analyse in Visual Studio 2013  Image Ccartoon Effect  Hangman

PAUSE

Microsoft Code Analysis for Managed Code Rules  Design Warnings Warnings that support correct library design as specified by the.NET Framework Design Guidelines. Globalization WarningsWarnings that support world-ready libraries and applications. Interoperability WarningsWarnings that support interaction with COM clients. Maintainability WarningsWarnings that support library and application maintenance. Mobility WarningsWarnings that support efficient power usage. Naming Warnings Warnings that support adherence to the naming conventions of the.NET Framework Design Guidelines. Performance WarningsWarnings that support high-performance libraries and applications. Portability WarningsWarnings that support portability across different platforms. Reliability Warnings Warnings that support library and application reliability, such as correct memory and thread usage. Security WarningsWarnings that support safer libraries and applications. Usage WarningsWarnings that support appropriate usage of the.NET Framework. Code Analysis Policy ErrorsErrors that occur if the code analysis policy is not satisfied at check-in.

Examples  CA1000: Do not declare static members on generic types  CA1008: Enums should have zero value  CA1021: Avoid out parameters  CA1031: Do not catch general exception types  CA1032: Implement standard exception constructors  CA1040: Avoid empty interfaces  CA1047: Do not declare protected members in sealed types  CA1065: Do not raise exceptions in unexpected locations

Examples  CA1402: Avoid overloads in COM visible interfaces  CA1407: Avoid static members in COM visible types  CA1500: Variable names should not match field names  CA1505: Avoid unmaintainable code  CA1502: Avoid excessive complexity  Exkurs: Walkthrough – Code-Metrik in Visual Studio 2013  Simple Calculator  Etc, etc, etc.

C# Coding Conventions   Naming Conventions  Layout Conventions  Commenting Conventions  Language Guidelines

Secure Coding Guidelines How to: Run Partially Trusted Code in a Sandbox Explains how to run a partially trusted application in a restricted security environment, which limits the code access permissions granted to it. Securing State DataDescribes how to protect private members. Securing Method AccessDescribes how to help protect methods from being called by partially trusted code. Securing Wrapper CodeDescribes security concerns for code that wraps other code. Security and Public Read-only Array Fields Describes security concerns for code that uses public read-only arrays found in.NET Framework libraries. Securing Exception HandlingDescribes security concerns for handling exceptions. Security and User InputDescribes security concerns for applications that accept user input. Security and Remoting ConsiderationsDescribes security concerns for applications that communicate across application domains. Security and SerializationDescribes security concerns when serializing objects. Security and Race ConditionsDescribes how to avoid race conditions in your code. Security and On-the-Fly Code GenerationDescribes security concerns for applications that generate dynamic code. Security and Setup IssuesDescribes considerations for the testing and setup of your application. Code Access Security Describes.NET Framework code access security in detail and provides instructions for using it in your code. Role-Based Security Describes.NET Framework role-based security in detail and provides instructions for using it in your code.

Alternativen zu den Regeln von Microsoft Gendarme:   Example:  AvoidDeepNamespaceHierarchyRule 