Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
5f6dced
PLSQL 12 Message
radwanromy Oct 23, 2021
82bb708
PLSQL Cursor
radwanromy Oct 24, 2021
f80ed21
PLSQL Cursor Where Current of and update for query
radwanromy Oct 24, 2021
f005422
PLSQL Bio
radwanromy Oct 24, 2021
31dc40d
PLSQL Function
radwanromy Oct 24, 2021
92c5217
PLSQL Cursor 02
radwanromy Oct 24, 2021
3438d89
PL SQL Create and Replace
radwanromy Oct 24, 2021
4410a3a
PL SQL QUERY_EMP
radwanromy Oct 24, 2021
d39158f
PL SQL ADD
radwanromy Oct 24, 2021
219ae52
PL SQL ADD DEPT
radwanromy Oct 24, 2021
cc6f849
PLSQL Leave EMP
radwanromy Oct 24, 2021
5043995
PLSQL_PROCESS_EMPS
radwanromy Oct 24, 2021
80931dd
PLSQL_Function_Get
radwanromy Oct 24, 2021
307e028
PLSQL_Function_TAX
radwanromy Oct 24, 2021
abddab4
PLSQL_DML_CALL
radwanromy Oct 24, 2021
e45c99f
PLSQL_DML_CALL_UPDATE
radwanromy Oct 24, 2021
510d7c7
PLSQL_DROP PRocedure
radwanromy Oct 24, 2021
625c5bd
PLSQL_On_Procedure
radwanromy Oct 24, 2021
9d37500
PLSQL_PACKAGE
radwanromy Oct 24, 2021
6e04889
PLSQL_COMM_PACKAGE
radwanromy Oct 24, 2021
61d2dd1
PLSQL_RESET_COMM
radwanromy Oct 24, 2021
bbf9347
PLSQL_COMM_PACKAGE
radwanromy Oct 24, 2021
fd6db65
PL SQL DBMS EXECUTION
radwanromy Oct 24, 2021
0b4f695
PLSQL METER TO YARD
radwanromy Oct 24, 2021
deeb8d9
PLSQL_OVER_PACK
radwanromy Oct 24, 2021
fc9890d
PLSQL_UPDATED_OVER_PACK
radwanromy Oct 24, 2021
cdca248
PLSQL_UPDATED_TAXES_PACK
radwanromy Oct 24, 2021
6a0c43e
PLSQL_PACK CUR
radwanromy Oct 24, 2021
f549911
PLSQL_EMP_PACK
radwanromy Oct 24, 2021
6e217d9
PLSQL_EMP_PACKAGE
radwanromy Oct 24, 2021
d392cc4
PLSQL_DELETE_ALL_ROWS
radwanromy Oct 24, 2021
992d31e
PLSQL_DELETE_ALL_ROW
radwanromy Oct 24, 2021
48a9623
PLSQL_DEL_ROWS
radwanromy Oct 24, 2021
78a5561
PLSQL_DEL
radwanromy Oct 24, 2021
a294ef4
PLSQL_COMMIT_JOB_NUMBER
radwanromy Oct 24, 2021
fc526af
PLSQL_BFILE
radwanromy Oct 25, 2021
32277d2
PLSQL_BFILE 2
radwanromy Oct 25, 2021
39c35bb
PLSQL_GETLEANTH
radwanromy Oct 25, 2021
925bac2
PLSQL_BLOB_CLOB_ALTER
radwanromy Oct 25, 2021
a3da58a
PLSQL BLOB CLOB INSERT
radwanromy Oct 25, 2021
284b9e3
PLSQL BLOB CLOB UPDATE
radwanromy Oct 25, 2021
561a0d7
PLSQL CLOB DML
radwanromy Oct 25, 2021
cd32f41
PLSQL DBMS LOB SUBSTR INSTR
radwanromy Oct 25, 2021
de46106
PLSQL DBMS RESUME
radwanromy Oct 25, 2021
a29544b
PLSQL ISTEMPLOBOPEN
radwanromy Oct 25, 2021
4a416f0
PLSQL_Exception_Handling
radwanromy Oct 27, 2021
a17459c
PLSQL_EMAIL_VALIDATION
radwanromy Oct 27, 2021
c61bea0
PLSQL_EMAIL_VALIDATION_UPDATED
radwanromy Oct 27, 2021
ce7b11f
FUCNTION_EMAIL_VALIDATION
radwanromy Oct 28, 2021
b3a070d
DPK_RADWAN Package Create
radwanromy Nov 2, 2021
3ee3f8c
Package Test Execute
radwanromy Nov 2, 2021
3f97e81
DPK_RADWAN PROCEDURE.pkb
radwanromy Nov 2, 2021
4439e15
DML_EMP_VALUES
radwanromy Nov 3, 2021
9e1002e
Trigger_Temp_Table
radwanromy Nov 3, 2021
056a920
Trigger Test Insert
radwanromy Nov 3, 2021
09ba9b1
Trigger Store Test
radwanromy Nov 3, 2021
aff5667
Trigger Table Check
radwanromy Nov 3, 2021
d73e254
Drop Trigger
radwanromy Nov 3, 2021
39fa6b2
Trigger Delete Check
radwanromy Nov 3, 2021
0d15161
Trigger Insert Check
radwanromy Nov 3, 2021
f4ce7b9
Package Procedure To Perform In Trigger
radwanromy Nov 9, 2021
f563de1
Package Procedure To Perform In Trigger 02
radwanromy Nov 9, 2021
d635b74
Package Procedure To Perform In Trigger 03
radwanromy Nov 9, 2021
1d126bc
Package Procedure To Perform In Trigger 04
radwanromy Nov 9, 2021
def7c0a
Add Del Up Package Procedure To Perform In Trigger
radwanromy Nov 9, 2021
cbb58b5
Add Del Up Package Procedure To Perform In Trigger 02
radwanromy Nov 9, 2021
1f48a1f
Add Del Up Package Procedure To Perform In Trigger updated
radwanromy Nov 9, 2021
36c978c
Add Del Up Package Procedure To Perform In Trigger updated with delet…
radwanromy Nov 9, 2021
0842151
TPP
radwanromy Nov 9, 2021
4d43b6b
TPP 001
radwanromy Nov 10, 2021
7860a24
TPP 002
radwanromy Nov 10, 2021
1b03015
TPP 003
radwanromy Nov 10, 2021
79164f5
PLSQL 080
radwanromy Nov 21, 2021
dea44b9
PLSQL 081
radwanromy Nov 21, 2021
2433009
PLSQL 082
radwanromy Nov 21, 2021
4364677
PLSQL 083
radwanromy Nov 21, 2021
e7ae57c
PLSQL 084
radwanromy Nov 21, 2021
939e42d
PLSQL 085
radwanromy Nov 21, 2021
b06fafb
PLSQL Problem Solving 01
radwanromy Nov 22, 2021
7d3a97c
PLSQL Problem Solving 02
radwanromy Nov 22, 2021
b00a90c
PLSQL Problem Solving 03
radwanromy Nov 22, 2021
3121b5d
PLSQL Problem Solving 04
radwanromy Nov 22, 2021
59bfc0f
PLSQL Problem Solving 05
radwanromy Nov 22, 2021
ff4958f
PLSQL Problem Solving 06
radwanromy Nov 23, 2021
bc710d4
PLSQL Problem Solving 07
radwanromy Nov 23, 2021
e9c58b6
PLSQL Problem Solving 08
radwanromy Nov 23, 2021
d16e2be
PLSQL Problem Solving 09
radwanromy Nov 23, 2021
2d069be
PLSQL Problem Solving 10
radwanromy Nov 23, 2021
0e361fb
PLSQL Problem Solving 11
radwanromy Nov 23, 2021
5ad47ff
SYS_CONTEXT
radwanromy Jan 4, 2022
76bcfac
Login Function Create
radwanromy Jan 4, 2022
ffd4886
Login Check Using Function
radwanromy Jan 4, 2022
bfdb23c
Login Check Using Procedure
radwanromy Jan 4, 2022
b175308
Create SECURITY.md
radwanromy Jan 6, 2022
9c8d8ff
Work Flow
radwanromy Jan 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/veracode-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow will initiate a Veracode Static Analysis Pipeline scan, return a results.json and convert to SARIF for upload as a code scanning alert

name: Veracode Static Analysis Pipeline Scan

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '34 4 * * 1'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a job to build and submit pipeline scan, you will need to customize the build process accordingly and make sure the artifact you build is used as the file input to the pipeline scan file parameter
build-and-pipeline-scan:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it and copies all sources into ZIP file for submitting for analysis. Replace this section with your applications build steps
- uses: actions/checkout@v2
with:
repository: ''

- run: zip -r veracode-scan-target.zip ./

# download the Veracode Static Analysis Pipeline scan jar
- run: curl --silent --show-error --fail -O https://downloads.veracode.com/securityscan/pipeline-scan-LATEST.zip
- run: unzip -o pipeline-scan-LATEST.zip

- uses: actions/setup-java@v1
with:
java-version: 1.8
- run: java -jar pipeline-scan.jar --veracode_api_id "${{secrets.VERACODE_API_ID}}" --veracode_api_key "${{secrets.VERACODE_API_KEY}}" --fail_on_severity="Very High, High" --file veracode-scan-target.zip
continue-on-error: true
- name: Convert pipeline scan output to SARIF format
id: convert
uses: veracode/veracode-pipeline-scan-results-to-sarif@ff08ae5b45d5384cb4679932f184c013d34da9be
with:
pipeline-results-json: results.json
- uses: github/codeql-action/upload-sarif@v1
with:
# Path to SARIF file relative to the root of the repository
sarif_file: veracode-results.sarif
11 changes: 11 additions & 0 deletions COMM_PACKAGE.pkb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE OR REPLACE PACKAGE BODY comm_package IS
FUNCTION validate_comm (p_comm IN NUMBER) RETURN BOOLEAN
IS v_max_comm NUMBER;
BEGIN -- validates commission to be less than maximum
-- commission in the table
END validate_comm;
PROCEDURE reset_comm (p_comm IN NUMBER)
IS BEGIN -- calls validate_comm with specified value
END reset_comm;
END comm_package;
/
5 changes: 5 additions & 0 deletions Create For Trigger Operation On Table.trg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

CREATE TABLE employee(
employee_id int NOT NULL,last_name varchar(255) NOT NULL, job_id varchar(255) NOT NULL,salary varchar(255) NOT NULL,
PRIMARY KEY (employee_id)
);
9 changes: 9 additions & 0 deletions DECODE.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* Formatted on 21-Oct-21 5:11:34 AM (QP5 v5.287) */
SELECT *
FROM HR.EMPLOYEES
WHERE department_id =
DECODE ( :PDEPT,
'ALL', department_id,
'TEN', 10,
'NINTY', 90,
20);
90 changes: 90 additions & 0 deletions DML_EMP_VALUES.trg
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/* Formatted on 03-Nov-21 11:55:31 AM (QP5 v5.287) */
CREATE OR REPLACE TRIGGER dml_emp_values
AFTER DELETE OR INSERT OR UPDATE
ON employee
FOR EACH ROW
ENABLE
DECLARE
idn NUMBER (6, 0);
user_name VARCHAR2 (25);
timestampn VARCHAR2 (25);
old_last_name VARCHAR2 (25);
new_last_name VARCHAR2 (25);
old_title VARCHAR2 (10);
new_title VARCHAR2 (10);
old_salary VARCHAR2 (10);
new_salary VARCHAR2 (10);
BEGIN
SELECT USER, TO_CHAR (SYSDATE, 'DD/MON/YYYY HH24:MI:SS')
INTO user_name, timestampn
FROM DUAL;

IF INSERTING
THEN
INSERT INTO t_emp_table (user_name,
timestampn,
idn,
old_last_name,
new_last_name,
old_title,
new_title,
old_salary,
new_salary,
operation)
VALUES (USER,
SYSDATE,
:NEW.employee_id,
:NEW.last_name,
:NEW.last_name,
:NEW.job_id,
:NEW.last_name,
:NEW.salary,
:NEW.salary,
'Insert');
ELSIF DELETING
THEN
INSERT INTO t_emp_table (user_name,
timestampn,
idn,
old_last_name,
new_last_name,
old_title,
new_title,
old_salary,
new_salary,
operation)
VALUES (USER,
SYSDATE,
:OLD.employee_id,
:OLD.last_name,
:OLD.last_name,
:OLD.job_id,
:OLD.last_name,
:OLD.salary,
:OLD.salary,
'Delete');
ELSIF UPDATING
THEN
INSERT INTO t_emp_table (user_name,
timestampn,
idn,
old_last_name,
new_last_name,
old_title,
new_title,
old_salary,
new_salary,
operation)
VALUES (USER,
SYSDATE,
:OLD.employee_id,
:OLD.last_name,
:NEW.last_name,
:OLD.job_id,
:NEW.last_name,
:OLD.salary,
:NEW.salary,
'Insert');
END IF;
END;
/
79 changes: 79 additions & 0 deletions DPK_RADWAN PROCEDURE.pkb
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
CREATE OR REPLACE PACKAGE BODY dpk_radwan
AS
PROCEDURE p_email_validation (email_address IN VARCHAR2) IS
at_the_rate NUMBER;
dot_symbol NUMBER;
c_at_the_rate NUMBER;
c_dot_symbol NUMBER;
string_length NUMBER;
before_dot NUMBER;
temp NUMBER;
after_dot NUMBER;
undefine_symbol NUMBER;
BEGIN -- domain := INSTR (email_address, 'com'or '.in'or'.bd'or '.gov'or '.org');

at_the_rate := INSTR (email_address, '@');
dot_symbol := INSTR (email_address, '.');
string_length := LENGTH (email_address);
c_at_the_rate :=
ROUND (LENGTH (email_address) - LENGTH (REPLACE (email_address, '@')));
c_dot_symbol :=
ROUND (LENGTH (email_address) - LENGTH (REPLACE (email_address, '.')));
-- after_at_the_rate := at_the_rate+1;
before_dot := INSTR (email_address, '.');
after_dot := INSTR (email_address, '.');
temp := dot_symbol;
--DBMS_OUTPUT.put_line ('TEMP' || ' : ' || temp);
undefine_symbol :=
INSTR (email_address, '!')
|| INSTR (email_address, '/')
|| INSTR (email_address, '#')
|| INSTR (email_address, '%')
|| INSTR (email_address, '$')
|| INSTR (email_address, '^')
|| INSTR (email_address, '&')
|| INSTR (email_address, '*')
|| INSTR (email_address, '(')
|| INSTR (email_address, '(')
|| INSTR (email_address, '-')
|| INSTR (email_address, '+')
|| INSTR (email_address, '=')
|| INSTR (email_address, '`')
|| INSTR (email_address, '~')
|| INSTR (email_address, '?')
|| INSTR (email_address, '{')
|| INSTR (email_address, '}')
|| INSTR (email_address, '[')
|| INSTR (email_address, ']')
|| INSTR (email_address, '\')
|| INSTR (email_address, '|')
|| INSTR (email_address, '"')
|| INSTR (email_address, ':')
|| INSTR (email_address, ';')
|| INSTR (email_address, ']')
|| INSTR (email_address, '[')
|| INSTR (email_address, '?')
|| INSTR (email_address, '>')
|| INSTR (email_address, '<')
|| INSTR (email_address, ',')
|| INSTR (email_address, '..')
|| INSTR (email_address, '.@')
|| INSTR (email_address, '@.');
-- DBMS_OUTPUT.put_line (before_dot || ' AND ' || after_dot);
IF ( ( (dot_symbol = 0)
OR (at_the_rate = 0)
OR (undefine_symbol >= 1)
OR (at_the_rate = 1)
OR (c_at_the_rate > 1)
OR (at_the_rate = string_length)
OR (dot_symbol = string_length)))
THEN
DBMS_OUTPUT.put_line ('Invalid email addresses');
END IF;
DBMS_OUTPUT.put_line ('Valid email addresses');
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Can not able to say valid or invalid');
END p_email_validation;
END dpk_radwan;
5 changes: 5 additions & 0 deletions DPK_RADWAN Package Create.pks
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* Formatted on 02-Nov-21 4:43:58 PM (QP5 v5.287) */
CREATE OR REPLACE PACKAGE dpk_radwan
AS
PROCEDURE p_email_validation (email_address IN VARCHAR2);
END dpk_radwan;
1 change: 1 addition & 0 deletions Drop Trigger.trg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TRIGGER dml_emp_values;
14 changes: 14 additions & 0 deletions E_TPP package and procedures creating with UP date Procedure.pks
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE OR REPLACE PACKAGE e_tpp
AS

PROCEDURE delEmployee (e_id employee.employee_id%TYPE);

PROCEDURE addEmployee (e_id employee.employee_id%TYPE,
e_name employee.last_name%TYPE,
e_job employee.job_id%TYPE,
e_sal employee.salary%TYPE);
PROCEDURE upEmployee (e_id employee.employee_id%TYPE,
e_name employee.last_name%TYPE,
e_job employee.job_id%TYPE,
e_sal employee.salary%TYPE);
END e_tpp;
10 changes: 10 additions & 0 deletions E_TPP package and procedures creating.pks
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CREATE OR REPLACE PACKAGE e_tpp
AS

PROCEDURE delEmployee (e_id employee.employee_id%TYPE);
PROCEDURE listEmployee;
PROCEDURE addEmployee (e_id employee.employee_id%TYPE,
e_name employee.last_name%TYPE,
e_job employee.job_id%TYPE,
e_sal employee.salary%TYPE);
END e_tpp;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--EXECUTE p_email_validation( 'radwanromy@gmail.com');
EXECUTE e_tpp.addEmployee(033,'Radwan','CEO',5000);
18 changes: 18 additions & 0 deletions FORWARD_PACK.pkb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* Formatted on 25-Oct-21 4:53:03 AM (QP5 v5.287) */
CREATE OR REPLACE PACKAGE BODY forward_pack
IS
PROCEDURE award_bonus(1000)
IS
BEGIN
calc_rating(5); --illegal reference

END;

PROCEDURE calc_rating(5)
IS
BEGIN
...
END;

END forward_pack;
/
75 changes: 75 additions & 0 deletions FUNCTION_EMAIL_VALIDATION.fnc
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* Formatted on 28/Oct/21 11:51:07 AM (QP5 v5.287) */
CREATE OR REPLACE FUNCTION email_validation (email_address IN VARCHAR2)
RETURN VARCHAR2
IS
at_the_rate NUMBER;
dot_symbol NUMBER;
c_at_the_rate NUMBER;
c_dot_symbol NUMBER;
string_length NUMBER;
before_dot NUMBER;
temp NUMBER;
after_dot NUMBER;
undefine_symbol NUMBER;
BEGIN
-- domain := INSTR (email_address, 'com'or '.in'or'.bd'or '.gov'or '.org');
at_the_rate := INSTR (email_address, '@');
dot_symbol := INSTR (email_address, '.');
string_length := LENGTH (email_address);
c_at_the_rate :=
ROUND (LENGTH (email_address) - LENGTH (REPLACE (email_address, '@')));
c_dot_symbol :=
ROUND (LENGTH (email_address) - LENGTH (REPLACE (email_address, '.')));
-- after_at_the_rate := at_the_rate+1;
before_dot := INSTR (email_address, '.');
after_dot := INSTR (email_address, '.');
temp := dot_symbol;
DBMS_OUTPUT.put_line ('TEMP' || ' : ' || temp);
undefine_symbol :=
INSTR (email_address, '!')
|| INSTR (email_address, '/')
|| INSTR (email_address, '#')
|| INSTR (email_address, '%')
|| INSTR (email_address, '$')
|| INSTR (email_address, '^')
|| INSTR (email_address, '&')
|| INSTR (email_address, '*')
|| INSTR (email_address, '(')
|| INSTR (email_address, '(')
|| INSTR (email_address, '-')
|| INSTR (email_address, '+')
|| INSTR (email_address, '=')
|| INSTR (email_address, '`')
|| INSTR (email_address, '~')
|| INSTR (email_address, '?')
|| INSTR (email_address, '{')
|| INSTR (email_address, '}')
|| INSTR (email_address, '[')
|| INSTR (email_address, ']')
|| INSTR (email_address, '\')
|| INSTR (email_address, '|')
|| INSTR (email_address, '"')
|| INSTR (email_address, ':')
|| INSTR (email_address, ';')
|| INSTR (email_address, ']')
|| INSTR (email_address, '[')
|| INSTR (email_address, '?')
|| INSTR (email_address, '>')
|| INSTR (email_address, '<')
|| INSTR (email_address, ',')
|| INSTR (email_address, '..')
|| INSTR (email_address, '.@')
|| INSTR (email_address, '@.');
DBMS_OUTPUT.put_line (before_dot || ' AND ' || after_dot);
IF ( ( (dot_symbol = 0)
OR (at_the_rate = 0)
OR (undefine_symbol >= 1)
OR (at_the_rate = 1)
OR (c_at_the_rate > 1)
OR (at_the_rate = string_length)
OR (dot_symbol = string_length)))
THEN
RETURN 'Invalid email addresses';
END IF;
RETURN 'Valid email addresses';
END email_validation;
Loading