What data is in scriptSig
scriptSig in a typical p2pkh scenario, which is the vact majority of bitcoin transactions, only contains the public key of the scriptPubKey hash as well as the signature. This means there's no metadata other than the public key and the signature for authorizing the payment.
For non-p2pkh transactions, such as for example p2sh transactions, more data is included in the scriptSig. For example in p2sh multisig, the multiple public keys capable of authorizing the multisig will be revealed. In even more complicated scripts, the scriptSig may reveal significant information, depending on what the scriptPubKey script is requesting. For example, there are snowflake transactions that require scriptSig to be solutions to certain puzzles. However, these transactions are very rare.
How transactions are validated
There are multiple security models in validating a transaction. Transaction validation is a different notion from transaction confirmation which you are talking about. Transaction validation asks whether a transaction is valid – for example, it is of the right format, it follows Kirchhoff's Law (i.e. sum of outputs is less than sum of inputs), and the outputs it spends have not been double spent. Validating a transaction requires access to the current UTXO.
Transaction confirmation on the other hand validates that a transaction has been buried under a certain amount of proof-of-work, for example k = 6 blocks. Checking the confirmation status of a transaction does not require traversing the whole data in the blockchain. It only requires looking at the blockchain headers. In the SPV security model, the transaction confirmation status is checked simply by checking that it was included in a block and buried under a certain amount of proof-of-work. This is done quickly without looking at the whole blockchain data (but just all of the blockchain headers) by providing a proof-of-inclusion which consists of Merkle tree path siblings.
Your last paragraph is a separate question and should go in a separate post. But it's already been addressed, e.g. at http://bitcoin.stackexchange.com/questions/13731/does-a-bitcoin-node-need-to-scan-through-the-whole-blockchain-in-order-to-be-100 (see also comments to answer). A full node has already indexed all transactions in the block chain by their hash (txid), so it can find any given transaction without rescanning the whole chain.
– Nate Eldredge – 2017-02-11T15:43:18.507thank you @NateEldredge. is there a specification on how this indexing is made? – a.costa – 2017-02-11T20:03:30.357
It's an implementation detail of the node client software. For Bitcoin Core, you can see https://en.bitcoin.it/wiki/Bitcoin_Core_0.11_(ch_2):_Data_Storage#The_UTXO_set_.28chainstate_leveldb.29
– Nate Eldredge – 2017-02-11T20:08:18.180so that means that when a full node indexes the blockchain it also calculate the hash of every transaction? – a.costa – 2017-02-11T20:23:52.813
Yes, that's correct. – Nate Eldredge – 2017-02-11T20:28:01.260