Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

OSS Audit — Git

Open Source Software Capstone Project

Student: Aijaz Mirza

Registration Number: 24BCE10602

Course: Open Source Software (NGMC)

Chosen Software: Git (GPL v2)


About This Project

This repository is part of the Open Source Audit capstone project. It contains five Bash shell scripts that demonstrate practical Linux skills, all centered around Git — the open-source version control system created by Linus Torvalds in 2005.

The accompanying report (submitted separately as PDF) covers Git's origin story, license analysis, Linux footprint, FOSS ecosystem, and a comparison with proprietary alternatives.


Scripts Overview

Script File What it does
1 script1_system_identity.sh Displays system info — kernel, user, uptime, distro, and Git/OS license
2 script2_package_inspector.sh Checks if Git and other FOSS packages are installed; uses case statement for philosophy notes
3 script3_disk_permission_auditor.sh Audits key Linux directories for size and permissions; checks Git-specific config paths
4 script4_log_analyzer.sh Reads a log file line by line, counts keyword occurrences, shows last 5 matches
5 script5_manifesto_generator.sh Interactive manifesto generator — asks 3 questions and saves a personalised philosophy statement to a .txt file

Dependencies

  • OS: Debian-based Linux (Ubuntu 20.04+ recommended)
  • Shell: Bash (pre-installed on all Linux systems)
  • Utilities used: uname, whoami, uptime, date, dpkg, du, ls, grep, awk, cut, cat
  • No external packages need to be installed beyond a standard Ubuntu setup.

How to Run Each Script

Step 0 — Clone the repo and make scripts executable

git clone https://github.com/Psp32/oss-audit-24bce10954.git
cd oss-audit-24bce10954
chmod +x *.sh

Script 1 — System Identity Report

./script1_system_identity.sh

Displays your Linux distro, kernel version, logged-in user, home directory, uptime, date/time, and the GPL v2 license message.


Script 2 — FOSS Package Inspector

./script2_package_inspector.sh

Loops through a list of FOSS packages (git, python3, vlc, firefox, apache2), checks if each is installed using dpkg, prints version info, and uses a case statement to print a philosophy note about each package.


Script 3 — Disk and Permission Auditor

./script3_disk_permission_auditor.sh

Iterates over important Linux directories (/etc, /var/log, /home, /usr/bin, /tmp, /var, /usr/share) using a for loop and reports size and permissions. Also checks Git-specific paths: ~/.gitconfig, /etc/gitconfig, and the git binary.


Script 4 — Log File Analyzer

./script4_log_analyzer.sh /var/log/syslog error

Arguments:

  • $1 — path to the log file (required)
  • $2 — keyword to search for (optional, defaults to error)

Reads the log file line by line using a while read loop, counts how many lines contain the keyword, and prints the last 5 matching lines.

Other examples:

./script4_log_analyzer.sh /var/log/auth.log failed
./script4_log_analyzer.sh /var/log/dpkg.log install

Script 5 — Open Source Manifesto Generator

./script5_manifesto_generator.sh

Asks you three interactive questions using read, then generates a personalised open source manifesto and saves it to manifesto_[username].txt in the current directory. The manifesto is also printed to the terminal.


Report Structure (submitted as PDF)

The full written report covers:

  • Part A — Origin story of Git, GPL v2 license analysis, ethics of open source
  • Part B — Git's Linux footprint (installation, directories, user, service management)
  • Part C — FOSS ecosystem (dependencies, GitHub/GitLab, community, governance)
  • Part D — Git vs proprietary alternatives (SVN, Perforce, BitKeeper) comparison table and verdict

License

All shell scripts in this repository are original work submitted for academic purposes. Git itself is licensed under GPL v2 — see git-scm.com for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages